Skip to content

Commit

Permalink
feat(clerkjs): Use enterprise_sso setting to check if enterprise_acco…
Browse files Browse the repository at this point in the history
…unts are shown
  • Loading branch information
Nikpolik committed Nov 25, 2024
1 parent 2b53a9a commit 97628f8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import { UserProfileSection } from './UserProfileSection';
import { Web3Section } from './Web3Section';

export const AccountPage = withCardStateProvider(() => {
const { attributes, social } = useEnvironment().userSettings;
const { attributes, social, enterpriseSSO } = useEnvironment().userSettings;
const card = useCardState();
const { user } = useUser();

const showUsername = attributes.username.enabled;
const showEmail = attributes.email_address.enabled;
const showPhone = attributes.phone_number.enabled;
const showConnectedAccounts = social && Object.values(social).filter(p => p.enabled).length > 0;
const showEnterpriseAccounts = user && user.enterpriseAccounts.length > 0;
const showEnterpriseAccounts = user && enterpriseSSO.enabled;
const showWeb3 = attributes.web3_wallet.enabled;

const shouldAllowIdentificationCreation =
Expand Down

0 comments on commit 97628f8

Please sign in to comment.