Skip to content

Commit

Permalink
Merge pull request #237 from kieronjmckenna/main
Browse files Browse the repository at this point in the history
Linkedin OIDC Logo and title in react auth
  • Loading branch information
J0 authored Jan 19, 2024
2 parents decec24 + 6055b9b commit 026a382
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/react/src/components/Auth/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const Icons = ({ provider }: IconsProps) => {
if (provider == 'azure') return azure()
if (provider == 'keycloak') return keycloak()
if (provider == 'linkedin') return linkedin()
if (provider == 'linkedin_oidc') return linkedin()
if (provider == 'notion') return notion()
if (provider == 'slack') return slack()
if (provider == 'spotify') return spotify()
Expand Down
11 changes: 10 additions & 1 deletion packages/react/src/components/Auth/interfaces/SocialAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ function SocialAuth({
setLoading(false)
}

function handleProviderNameEdgeCases(provider: string) {
if (provider === 'linkedin_oidc') {
return 'LinkedIn'
}
return provider
}

function capitalize(word: string) {
const lower = word.toLowerCase()
return word.charAt(0).toUpperCase() + lower.slice(1)
Expand Down Expand Up @@ -87,7 +94,9 @@ function SocialAuth({
template(
i18n?.[currentView]?.social_provider_text as string,
{
provider: capitalize(provider),
provider: capitalize(
handleProviderNameEdgeCases(provider)
),
}
)}
</Button>
Expand Down

0 comments on commit 026a382

Please sign in to comment.