clean up
This commit is contained in:
parent
be5464fa1d
commit
0db6029fd2
@ -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) {
|
||||
|
@ -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 }
|
||||
|
Loading…
x
Reference in New Issue
Block a user