mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix(ForgotPasswordPage): handle loading state correctly during password reset
This commit is contained in:
parent
728b28632b
commit
e79f111cf9
@ -46,9 +46,12 @@ const getForgotPasswordForm = (): ISchema => ({
|
||||
async run() {
|
||||
await form.submit();
|
||||
setLoading(true);
|
||||
await api.auth.lostPassword(form.values);
|
||||
try {
|
||||
await api.auth.lostPassword(form.values);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
message.success(t("Reset email sent successfully"));
|
||||
setLoading(false);
|
||||
form.reset();
|
||||
},
|
||||
loading,
|
||||
|
Loading…
x
Reference in New Issue
Block a user