diff --git a/apps/web/src/app/projects/page.tsx b/apps/web/src/app/projects/page.tsx index 499b999a..a2402141 100644 --- a/apps/web/src/app/projects/page.tsx +++ b/apps/web/src/app/projects/page.tsx @@ -508,6 +508,7 @@ function ProjectCard({ isOpen={isDeleteDialogOpen} onOpenChange={setIsDeleteDialogOpen} onConfirm={handleDeleteProject} + projectName={project.name} /> void; - onConfirm: () => void; -}) { - return ( - - { - e.preventDefault(); - e.stopPropagation(); - }} - > - - Delete Project - - Are you sure you want to delete this project? This action cannot be - undone. - - - - - - - - - ); -} +import { Button } from "@/components/ui/button"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { cn } from "@/lib/utils"; + +export function DeleteProjectDialog({ + isOpen, + onOpenChange, + onConfirm, + projectName, +}: { + isOpen: boolean; + onOpenChange: (open: boolean) => void; + onConfirm: () => void; + projectName?: string; +}) { + return ( + + { + e.preventDefault(); + e.stopPropagation(); + }} + > + + + {projectName ? ( + <> + {"Delete '"} + + {projectName} + + {"'?"} + + ) : ( + "Delete Project?" + )} + + + Are you sure you want to delete this project? This action cannot be + undone. + + + + + + + + + ); +}