Explorar o código

125024 don't switch while loading

soumaeda %!s(int64=2) %!d(string=hai) anos
pai
achega
196dd1657f
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      apps/app/src/components/LoginForm.tsx

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

@@ -498,7 +498,7 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
 
 
         <div className="row">
         <div className="row">
           <div className="text-right col-12 mt-2 py-2">
           <div className="text-right col-12 mt-2 py-2">
-            <a href="#login" id="login" className="link-switch" onClick={switchForm}>
+            <a href="#login" id="login" className="link-switch" onClick={isLoading ? undefined : switchForm}>
               <i className="icon-fw icon-login"></i>
               <i className="icon-fw icon-login"></i>
               {t('Sign in is here')}
               {t('Sign in is here')}
             </a>
             </a>
@@ -534,7 +534,8 @@ export const LoginForm = (props: LoginFormProps): JSX.Element => {
                 {/* Sign up link */}
                 {/* Sign up link */}
                 {isRegistrationEnabled && (
                 {isRegistrationEnabled && (
                   <div className="text-right mb-2">
                   <div className="text-right mb-2">
-                    <a href="#register" id="register" className="link-switch" onClick={switchForm}>
+                    <a
+                      href="#register" id="register" className="link-switch" onClick={isLoading ? undefined : switchForm}>
                       <i className="ti ti-check-box"></i> {t('Sign up is here')}
                       <i className="ti ti-check-box"></i> {t('Sign up is here')}
                     </a>
                     </a>
                   </div>
                   </div>