import { EllipsisVertical, Trash } from "lucide-react"; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "../ui/dropdown-menu"; import { Button } from "../ui/button"; import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from "../ui/alert-dialog"; import { useState } from "react"; import { useFetcher } from "@remix-run/react"; interface LogOptionsProps { id: string; } export const LogOptions = ({ id }: LogOptionsProps) => { const [deleteDialogOpen, setDeleteDialogOpen] = useState(false); const deleteFetcher = useFetcher(); const handleDelete = () => { deleteFetcher.submit( { id }, { method: "DELETE", action: "/api/v1/ingestion_queue/delete", encType: "application/json", }, ); setDeleteDialogOpen(false); }; return ( <> setDeleteDialogOpen(true)}> Delete Episode Are you sure you want to delete this episode? This action cannot be undone. Cancel Continue ); };