"use client"; import Image from "next/image"; import { useState } from "react"; import { Gallery, Item } from "react-photoswipe-gallery"; import { Thumbs } from "swiper/modules"; import { Swiper, SwiperSlide } from "swiper/react"; const images = [ { src: "/assets/img/photos/shs1.jpg", srcSet: "/assets/img/photos/shs1@2x.jpg 2x", }, { src: "/assets/img/photos/shs2.jpg", srcSet: "/assets/img/photos/shs2@2x.jpg 2x", }, { src: "/assets/img/photos/shs3.jpg", srcSet: "/assets/img/photos/shs3@2x.jpg 2x", }, { src: "/assets/img/photos/shs4.jpg", srcSet: "/assets/img/photos/shs4@2x.jpg 2x", }, ]; export default function Slider({ firstImage = "/assets/img/photos/shs1.jpg" }) { images[0].src = firstImage; const [thumbSwiper, setThumbSwiper] = useState(null); return (
{images.map((image, index) => ( {({ ref, open }) => (
image
)}
))} {/* */}
{/* */} {images.map((image, index) => ( image ))} {/* */} {/* */}
{" "}
); }