|
|
@ -19,7 +19,7 @@ import { |
|
|
DialogTitle, |
|
|
DialogTitle, |
|
|
} from '@/components/ui/dialog' |
|
|
} from '@/components/ui/dialog' |
|
|
|
|
|
|
|
|
export default function DangerZoneForm() { |
|
|
|
|
|
|
|
|
export default function DeleteAccountForm() { |
|
|
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false) |
|
|
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false) |
|
|
const [deleteConfirmEmail, setDeleteConfirmEmail] = useState('') |
|
|
const [deleteConfirmEmail, setDeleteConfirmEmail] = useState('') |
|
|
const [deleteReason, setDeleteReason] = useState('') |
|
|
const [deleteReason, setDeleteReason] = useState('') |
|
|
@ -39,6 +39,11 @@ export default function DangerZoneForm() { |
|
|
title: 'Please enter your correct email address', |
|
|
title: 'Please enter your correct email address', |
|
|
}) |
|
|
}) |
|
|
return |
|
|
return |
|
|
|
|
|
} else if (deleteReason.length < 4) { |
|
|
|
|
|
toast({ |
|
|
|
|
|
title: 'Please enter a reason for deletion', |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
} |
|
|
} |
|
|
requestAccountDeletion() |
|
|
requestAccountDeletion() |
|
|
} |
|
|
} |