From f8f011592e6088794f3d8afcf320b17ab7e84640 Mon Sep 17 00:00:00 2001 From: lunyachek Date: Wed, 1 Mar 2023 17:12:49 +0200 Subject: [PATCH] feat: Auth form visual enhancements --- src/login/LoginPage.jsx | 3 ++- src/register/components/ThirdPartyAuth.jsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/login/LoginPage.jsx b/src/login/LoginPage.jsx index e3fdd29f2f..0f4a4604e8 100644 --- a/src/login/LoginPage.jsx +++ b/src/login/LoginPage.jsx @@ -166,6 +166,7 @@ class LoginPage extends React.Component { const isInstitutionAuthActive = !!secondaryProviders.length && !currentProvider; const isSocialAuthActive = !!providers.length && !currentProvider; const isEnterpriseLoginDisabled = getConfig().DISABLE_ENTERPRISE_LOGIN; + const ThirdPartyAuthPreloader = isSocialAuthActive || (isEnterpriseLoginDisabled && isInstitutionAuthActive); return ( <> @@ -183,7 +184,7 @@ class LoginPage extends React.Component { )} - {thirdPartyAuthApiStatus === PENDING_STATE ? ( + {thirdPartyAuthApiStatus === PENDING_STATE && ThirdPartyAuthPreloader ? ( ) : ( <> diff --git a/src/register/components/ThirdPartyAuth.jsx b/src/register/components/ThirdPartyAuth.jsx index 3a8682488c..52283d89dc 100644 --- a/src/register/components/ThirdPartyAuth.jsx +++ b/src/register/components/ThirdPartyAuth.jsx @@ -25,6 +25,7 @@ const ThirdPartyAuth = (props) => { const isInstitutionAuthActive = !!secondaryProviders.length && !currentProvider; const isSocialAuthActive = !!providers.length && !currentProvider; const isEnterpriseLoginDisabled = getConfig().DISABLE_ENTERPRISE_LOGIN; + const ThirdPartyAuthPreloader = isSocialAuthActive || (isEnterpriseLoginDisabled && isInstitutionAuthActive); return ( <> @@ -34,7 +35,7 @@ const ThirdPartyAuth = (props) => { )} - {thirdPartyAuthApiStatus === PENDING_STATE ? ( + {thirdPartyAuthApiStatus === PENDING_STATE && ThirdPartyAuthPreloader ? ( ) : ( <>