This commit is contained in:
@@ -19,12 +19,6 @@ export default function Gallery({
|
||||
string | null
|
||||
>(null);
|
||||
|
||||
/*
|
||||
* Update the URL without causing a Next.js navigation.
|
||||
*
|
||||
* router.replace() would render the server page again, causing
|
||||
* /api/images and /api/tags to be requested again.
|
||||
*/
|
||||
const setFullScreenImage = useCallback((imageId: string | null) => {
|
||||
setFullScreenImageIdState(imageId);
|
||||
|
||||
@@ -43,7 +37,6 @@ export default function Gallery({
|
||||
);
|
||||
}, []);
|
||||
|
||||
// Read a fullscreen image from the initial URL.
|
||||
useEffect(() => {
|
||||
const synchronizeWithUrl = () => {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
@@ -59,7 +52,6 @@ export default function Gallery({
|
||||
};
|
||||
}, []);
|
||||
|
||||
// Prevent the gallery page from scrolling while the modal is open.
|
||||
useEffect(() => {
|
||||
if (!fullScreenImageId) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user