From f1bac6de7872c17860107d0e236d3afbb4aff92d Mon Sep 17 00:00:00 2001 From: Nikos Polykandriotis Date: Mon, 25 Nov 2024 12:14:59 +0200 Subject: [PATCH] feat: Use enterprise_sso setting to check if enterprise_accounts are shown --- .../clerk-js/src/ui/components/UserProfile/AccountPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/clerk-js/src/ui/components/UserProfile/AccountPage.tsx b/packages/clerk-js/src/ui/components/UserProfile/AccountPage.tsx index 8588ed7a20..5e0f569478 100644 --- a/packages/clerk-js/src/ui/components/UserProfile/AccountPage.tsx +++ b/packages/clerk-js/src/ui/components/UserProfile/AccountPage.tsx @@ -12,7 +12,7 @@ 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(); @@ -20,7 +20,7 @@ export const AccountPage = withCardStateProvider(() => { 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 =