From c48a1092f78a11c4e04b5dcd8d10660eb720dfbf Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 28 Oct 2022 21:01:23 +1100 Subject: [PATCH] Fixes bug with gallery not closing --- frontend/src/features/gallery/ImageGallery.tsx | 6 ++---- frontend/src/features/gallery/gallerySlice.ts | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/frontend/src/features/gallery/ImageGallery.tsx b/frontend/src/features/gallery/ImageGallery.tsx index a8a305f154..373bb5852c 100644 --- a/frontend/src/features/gallery/ImageGallery.tsx +++ b/frontend/src/features/gallery/ImageGallery.tsx @@ -123,10 +123,8 @@ export default function ImageGallery() { galleryContainerRef.current ? galleryContainerRef.current.scrollTop : 0 ) ); - if (!shouldHoldGalleryOpen) { - dispatch(setShouldHoldGalleryOpen(false)); - } dispatch(setShouldShowGallery(false)); + dispatch(setShouldHoldGalleryOpen(false)); }; const handleClickLoadMore = () => { @@ -254,7 +252,7 @@ export default function ImageGallery() { return (