hide user info until it's done loading
This commit is contained in:
parent
8f4bbcdafa
commit
f351c7013c
1 changed files with 11 additions and 1 deletions
|
@ -76,7 +76,17 @@ function HomePage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function UserLoginLogout() {
|
function UserLoginLogout() {
|
||||||
const { user, isAuthenticated, loginWithRedirect, logout } = useAuth0();
|
const {
|
||||||
|
isLoading,
|
||||||
|
user,
|
||||||
|
isAuthenticated,
|
||||||
|
loginWithRedirect,
|
||||||
|
logout,
|
||||||
|
} = useAuth0();
|
||||||
|
|
||||||
|
if (isLoading) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (isAuthenticated) {
|
if (isAuthenticated) {
|
||||||
// NOTE: Users created correctly should have these attributes... but I'm
|
// NOTE: Users created correctly should have these attributes... but I'm
|
||||||
|
|
Loading…
Reference in a new issue