"use client"; import { useRef } from "react"; import { Button } from "@/components/ui/button"; import { ConfirmButton } from "./confirm-button"; import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; type DeleteDialogProps = { id: string; open: boolean; onOpenChange: (open: boolean) => void; }; export default function DeleteDialog({ id, open, onOpenChange, }: DeleteDialogProps) { const formRef = useRef(null); const handleDelete = async (e: React.FormEvent) => { e.preventDefault(); console.log(`Deleting app with id: ${id}`); onOpenChange(false); // Close dialog after deleting }; const handleHoldComplete = () => { if (formRef.current) { formRef.current.requestSubmit(); } }; return (
Delete App Are you sure you want to delete this app? This action cannot be undone.
); }