Skip to content

Commit 278cb94

Browse files
authored
Merge pull request #5 from helpwave/patch/hide-realmchip
hide realm on main
2 parents 8c92a11 + 4fba079 commit 278cb94

3 files changed

Lines changed: 40 additions & 32 deletions

File tree

package-lock.json

Lines changed: 35 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "id.helpwave.de",
3-
"version": "0.1.7",
3+
"version": "0.1.8",
44
"repository": {
55
"type": "git",
66
"url": "git://github.com/helpwave/id.helpwave.de.git"

src/login/components/RealmChip.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ type RealmChipProps = {
88

99
export function RealmChip({ kcContext }: RealmChipProps) {
1010
const realmName = (kcContext.realm as { name?: string, realm?: string })?.realm ??
11-
(kcContext.realm as { name?: string })?.name ??
12-
'unknown'
11+
(kcContext.realm as { name?: string })?.name ??
12+
'unknown'
1313
const color = getRealmColor(realmName)
1414

15-
return (
15+
return realmName === 'main' ? <></> : (
1616
<Chip color={color} size="md" aria-label={`realm: ${realmName}`}>
1717
{realmName}
1818
</Chip>
1919
)
20-
}
20+
}

0 commit comments

Comments
 (0)