Skip to content

Commit

Permalink
fix: Always rely on enterpriseConnection.logoUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
LauraBeatris committed Dec 18, 2024
1 parent a9234f2 commit dad442a
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { iconImageUrl } from '@clerk/shared/constants';
import { useUser } from '@clerk/shared/react';
import type { EnterpriseAccountResource, OAuthProvider } from '@clerk/types';

Expand Down Expand Up @@ -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;

Expand All @@ -94,15 +92,6 @@ const EnterpriseAccountProviderIcon = ({ account }: { account: EnterpriseAccount
elementId: descriptors.enterpriseButtonsProviderIcon.setId(account.provider),
};

if (!isCustomOAuthProvider) {
return (
<Image
{...commonImageProps}
src={iconImageUrl(providerWithoutPrefix)}
/>
);
}

return enterpriseConnection?.logoPublicUrl ? (
<Image
{...commonImageProps}
Expand Down

0 comments on commit dad442a

Please sign in to comment.