'use client' import Lightbox from "yet-another-react-lightbox"; import "yet-another-react-lightbox/styles.css"; import { images } from "@/utility/constant.utils"; import { useState } from "react"; export default function Section3() { // Show only images with id 1 to 4 const selectedImages = images.filter(img => +img.id >= 13 && +img.id <= 16); const [open, setOpen] = useState(false); const [index, setIndex] = useState(0); return (
{selectedImages.map((img, i) => (
{ setIndex(i); setOpen(true); }} >
{img.alt}
))}
setOpen(false)} slides={selectedImages} index={index} />
); }