"use client"; import { useState } from "react"; import Image from "next/image"; import { ChevronLeft, ChevronRight } from "lucide-react"; const imagesPerPage = 6; const galleryImages = [ "/gl1.png", "/gl2-new.png", "/gl3.png", "/gl4.png", "/gl5.png", "/gl6.png", "/gl7.png", "/gl8.png", "/gl9.png", ]; export default function GallerySection() { const [currentPage, setCurrentPage] = useState(1); const totalPages = Math.ceil(galleryImages.length / imagesPerPage); const paginatedImages = galleryImages.slice( (currentPage - 1) * imagesPerPage, currentPage * imagesPerPage ); return (

Galeri Kami

{paginatedImages.map((img, index) => (
{`gallery-${index}`}
))}
{[...Array(totalPages)].map((_, i) => ( ))}
); }