soumaeda 2 лет назад
Родитель
Сommit
b621d61e94

+ 3 - 0
apps/app/src/components/InstallerForm.tsx

@@ -79,6 +79,9 @@ const InstallerForm = memo((): JSX.Element => {
 
       toastError(t('installer.failed_to_install'));
     }
+    finally {
+      setIsLoading(false);
+    }
   }, [currentLocale, router, t]);
 
   const hasErrorClass = isValidUserName ? '' : ' has-error';

+ 3 - 0
apps/app/src/components/InvitedForm.tsx

@@ -50,6 +50,9 @@ export const InvitedForm = (props: InvitedFormProps): JSX.Element => {
       setLoginErrors(err);
       setIsLoading(false);
     }
+    finally {
+      setIsLoading(false);
+    }
   }, [router]);
 
   const formNotification = useCallback(() => {

+ 6 - 0
apps/app/src/components/LoginForm.tsx

@@ -116,6 +116,9 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
       setLoginErrors(errs);
       setIsLoading(false);
     }
+    finally {
+      setIsLoading(false);
+    }
     return;
 
   }, [passwordForLogin, resetLoginErrors, router, usernameForLogin]);
@@ -329,6 +332,9 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
       }
       setIsLoading(false);
     }
+    finally {
+      setIsLoading(false);
+    }
     return;
   }, [usernameForRegister, nameForRegister, emailForRegister, passwordForRegister, resetRegisterErrors, router, isEmailAuthenticationEnabled]);