import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, } from "@/components/ui/alert-dialog"; import { Button } from "@/components/ui/button"; import { api } from "@/utils/api"; import { Paintbrush } from "lucide-react"; import { toast } from "sonner"; interface Props { composeId: string; } export const CancelQueuesCompose = ({ composeId }: Props) => { const { mutateAsync, isLoading } = api.compose.cleanQueues.useMutation(); return ( Are you sure to cancel the incoming deployments? This will cancel all the incoming deployments Cancel { await mutateAsync({ composeId, }) .then(() => { toast.success("Queues are being cleaned"); }) .catch((err) => { toast.error(err.message); }); }} > Confirm ); };