hacky solution for auto scroll feature for now

This commit is contained in:
2022-06-16 00:04:33 -07:00
parent a94cd6b85d
commit c939888d87
2 changed files with 8 additions and 14 deletions

View File

@@ -51,7 +51,7 @@ const GalleryImage = ({ data, pageContext }) => {
case "Escape":
case "KeyG": {
logKeyShortcut(e.code);
navigate("/photogallery/");
navigate(`/photogallery/#${image.base}`);
}
}
};
@@ -59,7 +59,7 @@ const GalleryImage = ({ data, pageContext }) => {
return () => {
document.removeEventListener("keydown", keyListener);
};
}, [pageContext]);
}, [pageContext, image.base]);
const name = getName(image);
const { meta, dateTaken: dt } = getMeta(image);