Skip to content

Commit 7c73f6e

Browse files
Minor frontend fixes (#353)
* fixes * fix /lint
1 parent 357f3a2 commit 7c73f6e

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

ui/src/components/views/auth/auth-ldap-page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,11 @@ export const AuthLdapPage = () => {
122122
</Button>
123123
</FormItem>
124124
</FormLayoutGroup>
125-
<Button className={styles.contactButton} href={authContact} mode='link'>
126-
{t('Contact Support')}
127-
</Button>
125+
<ConditionalRender conditions={[!!authContact, authContact != 'example.com']}>
126+
<Button className={styles.contactButton} href={authContact} mode='link'>
127+
{t('Contact Support')}
128+
</Button>
129+
</ConditionalRender>
128130
</form>
129131
</div>
130132
</Group>
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
export const toSentenceCase = (str: string): string => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()
1+
export const toSentenceCase = (str: string): string => {
2+
if (str.includes('@')) return str
3+
4+
if (str.includes('.')) return str
5+
6+
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()
7+
}

0 commit comments

Comments
 (0)