import { useEffect, useRef, useCallback } from "react"; interface Props { projectName: string; onConfirm: () => void; onCancel: () => void; } export default function ConfirmRemoveModal({ projectName, onConfirm, onCancel }: Props) { const overlayRef = useRef(null); useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { if (e.key === "Escape") onCancel(); }; document.addEventListener("keydown", handleKeyDown); return () => document.removeEventListener("keydown", handleKeyDown); }, [onCancel]); const handleOverlayClick = useCallback( (e: React.MouseEvent) => { if (e.target === overlayRef.current) onCancel(); }, [onCancel], ); return (

Remove Project

Are you sure you want to remove {projectName}? This will delete the container, config volume, and stored credentials.

); }