soumaeda 2 лет назад
Родитель
Сommit
c000021778
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      apps/app/src/components/LoginForm.tsx

+ 3 - 3
apps/app/src/components/LoginForm.tsx

@@ -106,10 +106,10 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
       const { redirectTo } = res.data;
       const { redirectTo } = res.data;
 
 
       if (redirectTo != null) {
       if (redirectTo != null) {
-        return router.push(redirectTo);
+        return router.push(redirectTo).then(() => setIsLoading(false));
       }
       }
 
 
-      return router.push('/');
+      return router.push('/').then(() => setIsLoading(false));
     }
     }
     catch (err) {
     catch (err) {
       const errs = toArrayIfNot(err);
       const errs = toArrayIfNot(err);
@@ -314,7 +314,7 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
 
 
       const { redirectTo } = res.data;
       const { redirectTo } = res.data;
       if (redirectTo != null) {
       if (redirectTo != null) {
-        router.push(redirectTo);
+        router.push(redirectTo).then(() => setIsLoading(false));
       }
       }
 
 
       if (isEmailAuthenticationEnabled) {
       if (isEmailAuthenticationEnabled) {