mirror of
https://github.com/outline/outline.git
synced 2026-12-05 02:44:34 +03:00
fix: Delete my account code confirmation step missing
This commit is contained in:
1 parent
fde8a9fd88
commit
92d5a7ee89
1 file changed
+3
-3
@@ -36,12 +36,11 @@ function UserDelete({ onSubmit }: Props) {
|
||||
try {
|
||||
await auth.requestDeleteUser();
|
||||
setWaitingCode(true);
|
||||
onSubmit();
|
||||
} catch (err) {
|
||||
toast.error(err.message);
|
||||
}
|
||||
},
|
||||
[auth, onSubmit]
|
||||
[auth]
|
||||
);
|
||||
|
||||
const handleSubmit = React.useCallback(
|
||||
@@ -49,11 +48,12 @@ function UserDelete({ onSubmit }: Props) {
|
||||
try {
|
||||
await auth.deleteUser(data);
|
||||
await auth.logout();
|
||||
onSubmit();
|
||||
} catch (err) {
|
||||
toast.error(err.message);
|
||||
}
|
||||
},
|
||||
[auth]
|
||||
[auth, onSubmit]
|
||||
);
|
||||
|
||||
const inputProps = register("code", {
|
||||
|
||||
Reference in new issue
Block a user