From 99f7536f191eb7b4f2ecff008f5523c500a02816 Mon Sep 17 00:00:00 2001 From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:46:26 -0300 Subject: [PATCH] fix(clerk-js): Fix broken enterprise connection icon for custom SAML provider (#4809) --- .changeset/friendly-trains-love.md | 5 +++++ .../UserProfile/EnterpriseAccountsSection.tsx | 11 ----------- 2 files changed, 5 insertions(+), 11 deletions(-) create mode 100644 .changeset/friendly-trains-love.md diff --git a/.changeset/friendly-trains-love.md b/.changeset/friendly-trains-love.md new file mode 100644 index 0000000000..cd11208d2c --- /dev/null +++ b/.changeset/friendly-trains-love.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Fix broken enterprise connection icon for custom SAML provider diff --git a/packages/clerk-js/src/ui/components/UserProfile/EnterpriseAccountsSection.tsx b/packages/clerk-js/src/ui/components/UserProfile/EnterpriseAccountsSection.tsx index 674e402d60..b697f3aef2 100644 --- a/packages/clerk-js/src/ui/components/UserProfile/EnterpriseAccountsSection.tsx +++ b/packages/clerk-js/src/ui/components/UserProfile/EnterpriseAccountsSection.tsx @@ -1,4 +1,3 @@ -import { iconImageUrl } from '@clerk/shared/constants'; import { useUser } from '@clerk/shared/react'; import type { EnterpriseAccountResource, OAuthProvider } from '@clerk/types'; @@ -83,7 +82,6 @@ const EnterpriseAccount = ({ account }: { account: EnterpriseAccountResource }) const EnterpriseAccountProviderIcon = ({ account }: { account: EnterpriseAccountResource }) => { const { provider, enterpriseConnection } = account; - const isCustomOAuthProvider = provider.startsWith('oauth_custom_'); const providerWithoutPrefix = provider.replace(/(oauth_|saml_)/, '').trim() as OAuthProvider; const connectionName = enterpriseConnection?.name ?? providerWithoutPrefix; @@ -94,15 +92,6 @@ const EnterpriseAccountProviderIcon = ({ account }: { account: EnterpriseAccount elementId: descriptors.enterpriseButtonsProviderIcon.setId(account.provider), }; - if (!isCustomOAuthProvider) { - return ( - - ); - } - return enterpriseConnection?.logoPublicUrl ? (