/** * PhotoGrid Component * Reusable photo grid display with modal support */ import { memo } from 'react'; import { Eye, AlertCircle } from 'lucide-react'; import { useIsMobile } from '@/hooks/use-mobile'; import type { PhotoItem } from '@/types/photos'; import { generatePhotoAlt } from '@/lib/photoHelpers'; import { LazyImage } from '@/components/common/LazyImage'; interface PhotoGridProps { photos: PhotoItem[]; onPhotoClick?: (photos: PhotoItem[], index: number) => void; maxDisplay?: number; className?: string; } export const PhotoGrid = memo(({ photos, onPhotoClick, maxDisplay, className = '' }: PhotoGridProps) => { const isMobile = useIsMobile(); const defaultMaxDisplay = isMobile ? 2 : 3; const maxToShow = maxDisplay ?? defaultMaxDisplay; const displayPhotos = photos.slice(0, maxToShow); const remainingCount = Math.max(0, photos.length - maxToShow); if (photos.length === 0) { return (