This commit is contained in:
Chuck Dries 2023-03-11 02:03:34 -08:00
parent be5464fa1d
commit 0db6029fd2
No known key found for this signature in database
GPG Key ID: A00B7AEAE1DC5BE6
2 changed files with 1 additions and 17 deletions

View File

@ -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) {

View File

@ -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 }