From 8c41dd626dbd38fe9f8a37a20ebab712e95ea309 Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 6 Oct 2025 15:15:34 +0200 Subject: [PATCH] Fix hero layout tile sizing and scroll hook --- .../gallery/layouts/HeroGalleryLayout.tsx | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/gallery/layouts/HeroGalleryLayout.tsx b/frontend/src/components/gallery/layouts/HeroGalleryLayout.tsx index dfd0374..617706c 100644 --- a/frontend/src/components/gallery/layouts/HeroGalleryLayout.tsx +++ b/frontend/src/components/gallery/layouts/HeroGalleryLayout.tsx @@ -50,6 +50,12 @@ export const HeroGalleryLayout: React.FC = ({ const overlayOpacity = gallerySettings.heroOverlayOpacity || 0.3; const [likedIds, setLikedIds] = useState>(new Set()); const canQuickComment = Boolean(feedbackEnabled && feedbackOptions?.allowComments && onOpenPhotoWithFeedback); + const gridRef = useRef(null); + const handleScrollToGrid = useCallback(() => { + if (gridRef.current) { + gridRef.current.scrollIntoView({ behavior: 'smooth', block: 'start' }); + } + }, []); // If an override is provided, always use it and skip initialization logic useEffect(() => { @@ -184,19 +190,19 @@ export const HeroGalleryLayout: React.FC = ({ return (
onPhotoClick(actualIndex)} > - -
+ +
{!isSelectionMode && ( <>