"use client" import { useState } from "react" import Image from "next/image" import { ChevronLeft, ChevronRight } from "lucide-react" import { Button } from "./ui/button" interface ImageGalleryProps { images: string[] } export function ImageGallery({ images }: ImageGalleryProps) { // Check if images is undefined or not an array if (!images || !Array.isArray(images)) { console.error('Images prop is undefined or not an array:', images); return