From a006adab5209e30a0be04fd8661ba267aa6668f9 Mon Sep 17 00:00:00 2001 From: eshanized Date: Fri, 3 Jan 2025 11:54:14 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20feat:=20add=20image=20zoom=20opt?= =?UTF-8?q?ions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Gallery.tsx | 76 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 15 deletions(-) diff --git a/src/pages/Gallery.tsx b/src/pages/Gallery.tsx index 226ac0b0..9e1f6b00 100644 --- a/src/pages/Gallery.tsx +++ b/src/pages/Gallery.tsx @@ -1,12 +1,13 @@ import { useState, useMemo } from 'react'; import { motion } from 'framer-motion'; -import { Camera } from 'lucide-react'; +import { Camera, X } from 'lucide-react'; import { GalleryImage } from '../components/gallery/GalleryImage'; import { CategoryFilter } from '../components/gallery/CategoryFilter'; import { galleryImages, categories } from '../data/gallery'; export default function Gallery() { const [selectedCategory, setSelectedCategory] = useState('All'); + const [zoomedImage, setZoomedImage] = useState(null); const filteredImages = useMemo(() => { return selectedCategory === 'All' @@ -15,32 +16,77 @@ export default function Gallery() { }, [selectedCategory]); return ( -
+
- -

Gallery

-

- Explore the visual journey of Snigdha OS + +

Gallery

+

+ Immerse yourself in the visual journey of Snigdha OS

- + + + -
+ {filteredImages.map((image) => ( - + setZoomedImage(image.src)} + className="cursor-pointer" + > + + ))} -
+
+ + {zoomedImage && ( + + + + + )}
); -} \ No newline at end of file +}