Skip to content

Commit d7a7ff5

Browse files
committed
Fix app being stuck in loading when there's no auth
1 parent a5b4100 commit d7a7ff5

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

Diff for: packages/client/src/App.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ const rotate2 = keyframes`
4949
`;
5050

5151
export function App() {
52-
const { initStatus } = useKeycloak();
53-
54-
const isLoading = initStatus === 'loading';
52+
const { isLoading } = useKeycloak();
5553

5654
return (
5755
<>

Diff for: packages/client/src/components/MainNavigation.tsx

+12-8
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function NavItem(props: ButtonProps & SmartLinkProps) {
3434
}
3535

3636
function MainNavigation() {
37-
const { keycloak } = useKeycloak();
37+
const { keycloak, isEnabled } = useKeycloak();
3838

3939
return (
4040
<Flex as='nav' aria-label='Main' gap={4} alignItems='center'>
@@ -48,13 +48,17 @@ function MainNavigation() {
4848
</NavItem>
4949
)}
5050
</List>
51-
<Divider
52-
orientation='vertical'
53-
borderLeftWidth='2px'
54-
borderColor='base.200'
55-
h='1rem'
56-
/>
57-
<UserInfo />
51+
{isEnabled && (
52+
<>
53+
<Divider
54+
orientation='vertical'
55+
borderLeftWidth='2px'
56+
borderColor='base.200'
57+
h='1rem'
58+
/>
59+
<UserInfo />
60+
</>
61+
)}
5862
</Flex>
5963
);
6064
}

0 commit comments

Comments
 (0)