Skip to content

Commit 6702f99

Browse files
author
Matt Raible
authored
Remove authState.isPending
Question: is it possible to do `!authState?.isAuthenticated` instead of `!authState && !authState.isAuthenticated`?
1 parent 6c98304 commit 6702f99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

okta-hosted-login/src/Navbar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const Navbar = ({ setCorsErrorModalOpen }) => {
6262
{authState.isAuthenticated && (
6363
<Menu.Item id="logout-button" onClick={logout}>Logout</Menu.Item>
6464
)}
65-
{!authState.isPending && !authState.isAuthenticated && (
65+
{!authState && !authState.isAuthenticated && (
6666
<Menu.Item onClick={login}>Login</Menu.Item>
6767
)}
6868
</Container>

0 commit comments

Comments
 (0)