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 { toast } from "sonner"; export const RemoveSSHPrivateKey = () => { const utils = api.useUtils(); const { mutateAsync, isLoading } = api.settings.cleanSSHPrivateKey.useMutation(); return ( Are you absolutely sure? This action cannot be undone. This will permanently delete the ssh private key. Cancel { await mutateAsync() .then(() => { toast.success("SSH private key deleted succesfully"); utils.auth.get.invalidate(); }) .catch(() => { toast.error("Error to delete the ssh private key"); }); }} > Confirm ); };