This commit is contained in:
aleensd 2024-11-19 10:06:09 +02:00
parent d4907fc810
commit a4872e7ea0

View File

@ -46,7 +46,7 @@ export default function ImageViewer() {
}, [image]);
useEffect(() => {
MediaPageStore.on('page_init', onImageLoad);
MediaPageStore.on('loaded_image_data', onImageLoad);
return () => MediaPageStore.removeListener('loaded_image_data', onImageLoad);
}, []);
@ -58,7 +58,7 @@ export default function ImageViewer() {
document.removeEventListener('keydown', handleKeyDown);
};
}, [isModalOpen, slideshowItems]);
const handleKeyDown = (event) => {
if (!isModalOpen) return;