mirror of
https://github.com/D4M13N-D3V/neroshitron.git
synced 2025-03-14 10:05:04 +00:00
fix:opening wrong and downloading wrong image
This commit is contained in:
parent
a3382a6434
commit
d8e30415cb
@ -124,13 +124,15 @@ const Gallery = ({ id, closeMenu }: GalleryProps) => {
|
||||
}
|
||||
};
|
||||
|
||||
setSelectedImage(images[currentIndex]);
|
||||
window.addEventListener('keydown', handleKeyDown);
|
||||
|
||||
// Clean up the event listener when the component is unmounted
|
||||
return () => {
|
||||
window.removeEventListener('keydown', handleKeyDown);
|
||||
};
|
||||
}, [selectedImage, currentIndex]);
|
||||
|
||||
}, [currentIndex]);
|
||||
|
||||
const handleClick = (image: string) => {
|
||||
setSelectedImage(image);
|
||||
|
Loading…
x
Reference in New Issue
Block a user