Skip to content

Commit

Permalink
Fix empty user register
Browse files Browse the repository at this point in the history
  • Loading branch information
mpinter committed Mar 24, 2023
1 parent f2aec25 commit bebde5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion next/utils/useAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ export const AccountProvider = ({ children }: { children: ReactNode }) => {

// map tier to status, TODO think about dropping global status and using only tier
useEffect(() => {
setStatus(mapTierToStatus(userData?.tier))
setStatus(userData ? mapTierToStatus(userData.tier) : AccountStatus.Idle)
}, [userData])

useEffect(() => {
Expand Down

0 comments on commit bebde5c

Please sign in to comment.