mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +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() {
|
async run() {
|
||||||
await form.submit();
|
await form.submit();
|
||||||
setLoading(true);
|
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"));
|
message.success(t("Reset email sent successfully"));
|
||||||
setLoading(false);
|
|
||||||
form.reset();
|
form.reset();
|
||||||
},
|
},
|
||||||
loading,
|
loading,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user