Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ui/src/components/views/auth/auth-ldap-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ export const AuthLdapPage = () => {
</Button>
</FormItem>
</FormLayoutGroup>
<Button className={styles.contactButton} href={authContact} mode='link'>
{t('Contact Support')}
</Button>
<ConditionalRender conditions={[!!authContact, authContact != 'example.com']}>
<Button className={styles.contactButton} href={authContact} mode='link'>
{t('Contact Support')}
</Button>
</ConditionalRender>
</form>
</div>
</Group>
Expand Down
8 changes: 7 additions & 1 deletion ui/src/lib/utils/to-sentence-case.util.ts
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
export const toSentenceCase = (str: string): string => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()
export const toSentenceCase = (str: string): string => {
if (str.includes('@')) return str

if (str.includes('.')) return str
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would mean that if a sentence ends with a dot - we don not capitalise the first letter. Is this expected?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Usually names doesnt contains special symbols ofc


return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()
}