'use client'; import React, { useEffect } from 'react'; import { X } from 'lucide-react'; interface PhotoModalProps { photoUrl: string; onClose: () => void; title?: string; } export default function PhotoModal({ photoUrl, onClose, title = 'Photo', }: PhotoModalProps) { useEffect(() => { const handleEscapeKey = (e: KeyboardEvent) => { if (e.key === 'Escape') { onClose(); } }; window.addEventListener('keydown', handleEscapeKey); return () => window.removeEventListener('keydown', handleEscapeKey); }, [onClose]); return (