Skip to content

Commit

Permalink
feat: add work experience property to the welcome page event (#1125)
Browse files Browse the repository at this point in the history
feat: Auth form visual enhancements
  • Loading branch information
attiyaIshaque authored and Lunyachek committed Apr 11, 2024
1 parent 27545ea commit ac6e84d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/login/LoginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand All @@ -183,7 +184,7 @@ class LoginPage extends React.Component {
</Hyperlink>
)}

{thirdPartyAuthApiStatus === PENDING_STATE ? (
{thirdPartyAuthApiStatus === PENDING_STATE && ThirdPartyAuthPreloader ? (
<Skeleton className="tpa-skeleton mb-3" height={30} count={2} />
) : (
<>
Expand Down
1 change: 1 addition & 0 deletions src/progressive-profiling/ProgressiveProfiling.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ const ProgressiveProfiling = (props) => {
isGenderSelected: !!values.gender,
isYearOfBirthSelected: !!values.year_of_birth,
isLevelOfEducationSelected: !!values.level_of_education,
isWorkExperienceSelected: !!values.work_experience,
host: queryParams?.host || '',
},
);
Expand Down
2 changes: 2 additions & 0 deletions src/progressive-profiling/tests/ProgressiveProfiling.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ describe('ProgressiveProfilingTests', () => {
isGenderSelected: false,
isYearOfBirthSelected: false,
isLevelOfEducationSelected: false,
isWorkExperienceSelected: false,
host: '',
};
delete window.location;
Expand Down Expand Up @@ -346,6 +347,7 @@ describe('ProgressiveProfilingTests', () => {
isGenderSelected: false,
isYearOfBirthSelected: false,
isLevelOfEducationSelected: false,
isWorkExperienceSelected: false,
host: 'http://example.com',
};
delete window.location;
Expand Down
3 changes: 2 additions & 1 deletion src/register/components/ThirdPartyAuth.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
Expand All @@ -34,7 +35,7 @@ const ThirdPartyAuth = (props) => {
</div>
)}

{thirdPartyAuthApiStatus === PENDING_STATE ? (
{thirdPartyAuthApiStatus === PENDING_STATE && ThirdPartyAuthPreloader ? (
<Skeleton className="tpa-skeleton" height={36} count={2} />
) : (
<>
Expand Down

0 comments on commit ac6e84d

Please sign in to comment.