From 6f5bf90a0b969e5c02a2523e3a380682850aabd9 Mon Sep 17 00:00:00 2001 From: Damien Ostler Date: Mon, 3 Jun 2024 02:25:25 -0400 Subject: [PATCH] fix --- app/gallery/admin/view/page.tsx | 41 +++++++++++++++++++----------- components/neroshitron/gallery.tsx | 2 +- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/app/gallery/admin/view/page.tsx b/app/gallery/admin/view/page.tsx index 5105c30..0841180 100644 --- a/app/gallery/admin/view/page.tsx +++ b/app/gallery/admin/view/page.tsx @@ -21,6 +21,9 @@ function PageComponent() { const [fileNames, setFileNames] = useState([]); const [selectedTags, setSelectedTags] = useState([]); + const [open, setOpen] = useState(false); + + const [images, setImages] = useState([]); const getData = async () => { const urlParams = new URLSearchParams(window.location.search); @@ -127,7 +130,7 @@ function PageComponent() { key={"galleryThumbnail"+galleryName+"-"+tags.join("")} id={originalName} columns={3} - onSelect={function (id: string, columns: number): void {}} + onSelect={function (id: string, columns: number): void { setOpen(true) }} title={galleryName} subscription={tier} tags={tags} @@ -210,21 +213,29 @@ function PageComponent() { )} -
- - - {images.map((image, index) => ( - - ))} - + {(open) && ( + <> + {/* + This is the modal for holding the gallery + */} + + + )}
); diff --git a/components/neroshitron/gallery.tsx b/components/neroshitron/gallery.tsx index c9542b1..9362421 100644 --- a/components/neroshitron/gallery.tsx +++ b/components/neroshitron/gallery.tsx @@ -114,7 +114,7 @@ const Gallery = ({ id, columns, closeMenu }: GalleryProps) => {