Skip to content

Commit 1af830b

Browse files
committed
♻️ Update DeleteConfirmation
1 parent dcfab1c commit 1af830b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

frontend/src/components/UserSettings/DeleteConfirmation.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ import { handleError } from "@/utils"
2121
const DeleteConfirmation = () => {
2222
const queryClient = useQueryClient()
2323
const { showSuccessToast, showErrorToast } = useCustomToast()
24-
const {
25-
handleSubmit,
26-
formState: { isSubmitting },
27-
} = useForm()
24+
const { handleSubmit } = useForm()
2825
const { logout } = useAuth()
2926

3027
const mutation = useMutation({
@@ -64,14 +61,14 @@ const DeleteConfirmation = () => {
6461

6562
<DialogFooter className="mt-4">
6663
<DialogClose asChild>
67-
<Button variant="outline" disabled={isSubmitting}>
64+
<Button variant="outline" disabled={mutation.isPending}>
6865
Cancel
6966
</Button>
7067
</DialogClose>
7168
<LoadingButton
7269
variant="destructive"
7370
type="submit"
74-
loading={isSubmitting}
71+
loading={mutation.isPending}
7572
>
7673
Delete
7774
</LoadingButton>

0 commit comments

Comments
 (0)