"use client"; import React, { useState } from 'react'; import Image from 'next/image'; interface ProductGalleryProps { image: string; name: string; images?: string[]; // opcjonalna dodatkowa galeria z contentu, u nas na razie w mocku mamy 1 image } export function ProductGallery({ image, name, images }: ProductGalleryProps) { const [mainImage, setMainImage] = useState(image || '/images/hero/shop-section-image.webp'); const gallery = images && images.length > 0 ? images : [image, '/images/hero/shop-section-image.webp']; return (
{name}
{gallery.length > 1 && (
{gallery.map((img, idx) => ( ))}
)}
); }