From 77df8418c8ce9ce9504733d273258474c9fd4dd2 Mon Sep 17 00:00:00 2001 From: Chuck Dries Date: Wed, 8 Mar 2023 01:24:28 -0800 Subject: [PATCH] scroll works but is jank in chrome --- src/pages/photogallery.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/pages/photogallery.tsx b/src/pages/photogallery.tsx index 675b03f..c7bdb67 100644 --- a/src/pages/photogallery.tsx +++ b/src/pages/photogallery.tsx @@ -110,7 +110,7 @@ const GalleryPage = ({ data, location }: PageProps { - if (!hash || hash.startsWith('all')) { + if (!hash) { return; } const el = document.getElementById(hash); @@ -118,7 +118,7 @@ const GalleryPage = ({ data, location }: PageProps { // don't scroll into view if user got here with back button scrollIntoView(); - }, 100); + }, 0); }, [setSortKey, setKeyword, scrollIntoView, location]); const images: GalleryImage[] = React.useMemo(() => { @@ -224,10 +224,10 @@ const GalleryPage = ({ data, location }: PageProps { - // e.preventDefault(); - // setSortKey("datePublished") - }} + // onClick={(e) => { + // // e.preventDefault(); + // // setSortKey("datePublished") + // }} to="?sort=datePublished#all" > show more @@ -264,9 +264,9 @@ const GalleryPage = ({ data, location }: PageProps