Skip to content

Commit

Permalink
feat: update TPA skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
zainab-amir committed Mar 5, 2024
1 parent 488644f commit 572b678
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/common-components/ThirdPartyAuth.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
RenderInstitutionButton,
SocialAuthProviders,
} from './index';
import classNames from "classnames";

/**
* This component renders the Single sign-on (SSO) buttons for the providers passed.
Expand Down Expand Up @@ -47,14 +48,23 @@ const ThirdPartyAuth = (props) => {
</div>
)}
{(isLoginPage && !isEnterpriseLoginDisabled && isSocialAuthActive) && (
<Hyperlink className="btn btn-link btn-sm text-body p-0 mb-4" destination={enterpriseLoginURL}>
<Hyperlink
className={classNames(
"btn btn-link btn-sm text-body p-0",
{ "mb-0": thirdPartyAuthApiStatus === PENDING_STATE },
{ "mb-4": thirdPartyAuthApiStatus !== PENDING_STATE },
)}
destination={enterpriseLoginURL}
>
<Icon src={Institution} className="institute-icon" />
{formatMessage(messages['enterprise.login.btn.text'])}
</Hyperlink>
)}

{thirdPartyAuthApiStatus === PENDING_STATE ? (
<Skeleton className="tpa-skeleton" height={36} count={2} />
{thirdPartyAuthApiStatus === PENDING_STATE || true ? (
<div className="mt-4">
<Skeleton className="tpa-skeleton" height={36} count={2} />
</div>
) : (
<>
{(isEnterpriseLoginDisabled && isInstitutionAuthActive) && (
Expand Down

0 comments on commit 572b678

Please sign in to comment.