import React, { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; interface GalleryItem { id: number; imageUrl: string; alt: string; } // Gallery photos from community events const galleryData: GalleryItem[] = [ { id: 1, imageUrl: '/photos/0001.jpg', alt: 'MCDi community gathering', }, { id: 2, imageUrl: '/photos/0002.jpg', alt: 'MCDi community event photo', }, { id: 3, imageUrl: '/photos/0003.jpg', alt: 'MCDi community event photo', }, { id: 4, imageUrl: '/photos/0004.jpg', alt: 'MCDi community event photo', }, { id: 5, imageUrl: '/photos/0005.jpg', alt: 'MCDi community event photo', }, { id: 6, imageUrl: '/photos/0006.jpg', alt: 'MCDi community event photo', }, { id: 7, imageUrl: '/photos/0007.jpg', alt: 'MCDi community event photo', }, { id: 8, imageUrl: '/photos/0008.jpg', alt: 'MCDi community event photo', }, { id: 9, imageUrl: '/photos/0009.jpg', alt: 'MCDi community event photo', }, { id: 10, imageUrl: '/photos/0010.jpg', alt: 'MCDi community event photo', }, ]; const Gallery: React.FC = () => { const [selectedImage, setSelectedImage] = useState(null); const openImage = (item: GalleryItem) => { setSelectedImage(item); }; const closeImage = () => { setSelectedImage(null); }; return (

Photo Gallery

{/* Photo Grid */}
{galleryData.map((item) => ( openImage(item)} >
{item.alt}
))}
{/* Image Modal */} {selectedImage && ( e.stopPropagation()} > {/* Close Button */} {/* Image Container */}
{selectedImage.alt}
)}
); }; export default Gallery;