mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-22 00:03:28 +01:00
fix
This commit is contained in:
parent
d4907fc810
commit
a4872e7ea0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user