clean up
This commit is contained in:
parent
be5464fa1d
commit
0db6029fd2
@ -22,21 +22,6 @@ export const shouldUpdateScroll = ({
|
|||||||
pathname,
|
pathname,
|
||||||
}) => {
|
}) => {
|
||||||
if (pathname.startsWith('/photogallery/') && pathname !== '/photogallery/' ) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
if (prevRouterProps?.location.pathname === pathname) {
|
if (prevRouterProps?.location.pathname === pathname) {
|
||||||
|
@ -2,8 +2,6 @@ import * as React from "react";
|
|||||||
import * as R from "ramda";
|
import * as R from "ramda";
|
||||||
import { graphql, Link, navigate, PageProps } from "gatsby";
|
import { graphql, Link, navigate, PageProps } from "gatsby";
|
||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import debounce from "lodash.debounce";
|
|
||||||
// import { Picker, Item } from "@adobe/react-spectrum";
|
|
||||||
|
|
||||||
import MasonryGallery from "../components/MasonryGallery";
|
import MasonryGallery from "../components/MasonryGallery";
|
||||||
import KeywordsPicker from "../components/KeywordsPicker";
|
import KeywordsPicker from "../components/KeywordsPicker";
|
||||||
@ -92,6 +90,7 @@ const GalleryPage = ({
|
|||||||
if (!hash.length) {
|
if (!hash.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log('remove hash')
|
||||||
navigate(
|
navigate(
|
||||||
getGalleryPageUrl({ sortKey, keyword: filterKeyword, showDebug }, ""),
|
getGalleryPageUrl({ sortKey, keyword: filterKeyword, showDebug }, ""),
|
||||||
{ replace: true }
|
{ replace: true }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user