Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aleensd committed Nov 19, 2024
1 parent c68066d commit 8b0f8e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/src/static/js/components/media-viewer/ImageViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}, []);

Expand All @@ -58,7 +58,7 @@ export default function ImageViewer() {
document.removeEventListener('keydown', handleKeyDown);
};
}, [isModalOpen, slideshowItems]);


const handleKeyDown = (event) => {
if (!isModalOpen) return;
Expand Down

0 comments on commit 8b0f8e6

Please sign in to comment.