Skip to content

Commit 3ddaf79

Browse files
Lunyacheksyedsajjadkazmii
authored andcommitted
feat: Hide preloaders for third party auth providers if they are disabled
1 parent a18df02 commit 3ddaf79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/common-components/ThirdPartyAuth.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const ThirdPartyAuth = (props) => {
3737
const isSocialAuthActive = !!providers.length && !currentProvider;
3838
const isEnterpriseLoginDisabled = getConfig().DISABLE_ENTERPRISE_LOGIN;
3939
const enterpriseLoginURL = getConfig().LMS_BASE_URL + ENTERPRISE_LOGIN_URL;
40+
const isThirdPartyAuthActive = isSocialAuthActive || (isEnterpriseLoginDisabled && isInstitutionAuthActive);
4041

4142
return (
4243
<>
@@ -61,7 +62,7 @@ const ThirdPartyAuth = (props) => {
6162
</Hyperlink>
6263
)}
6364

64-
{thirdPartyAuthApiStatus === PENDING_STATE ? (
65+
{thirdPartyAuthApiStatus === PENDING_STATE && isThirdPartyAuthActive ? (
6566
<div className="mt-4">
6667
<Skeleton className="tpa-skeleton" height={36} count={2} />
6768
</div>

0 commit comments

Comments
 (0)