diff --git a/gatsby-browser.tsx b/gatsby-browser.tsx index 876a6a0..5f0daf8 100644 --- a/gatsby-browser.tsx +++ b/gatsby-browser.tsx @@ -22,21 +22,6 @@ export const shouldUpdateScroll = ({ pathname, }) => { if (pathname.startsWith('/photogallery/') && pathname !== '/photogallery/' ) { - // if (prevRouterProps?.location.pathname === '/photogallery/') { - // console.log('scroll to image from gallery') - // // setTimeout(() => { - - // // window.scrollTo(0, 0); - // // }, 100) - // setTimeout(() => { - // window.scrollTo(0, 180); - // }, 10) - // } else { - // console.log('scroll to image from elsewhere') - // requestAnimationFrame(() => { - // window.scrollTo(0, 180); - // }) - // } return false; } if (prevRouterProps?.location.pathname === pathname) { diff --git a/src/pages/photogallery.tsx b/src/pages/photogallery.tsx index 107e3fb..d8f9064 100644 --- a/src/pages/photogallery.tsx +++ b/src/pages/photogallery.tsx @@ -2,8 +2,6 @@ import * as React from "react"; import * as R from "ramda"; import { graphql, Link, navigate, PageProps } from "gatsby"; import { Helmet } from "react-helmet"; -import debounce from "lodash.debounce"; -// import { Picker, Item } from "@adobe/react-spectrum"; import MasonryGallery from "../components/MasonryGallery"; import KeywordsPicker from "../components/KeywordsPicker"; @@ -92,6 +90,7 @@ const GalleryPage = ({ if (!hash.length) { return; } + console.log('remove hash') navigate( getGalleryPageUrl({ sortKey, keyword: filterKeyword, showDebug }, ""), { replace: true }