Fix false returned in useEffect
This commit is contained in:
parent
fca2ec3e15
commit
111d5ea610
|
@ -42,7 +42,6 @@ export const AccountProvider = ({ children }) => {
|
||||||
// document not defined on server
|
// document not defined on server
|
||||||
if (SSR) return
|
if (SSR) return
|
||||||
const { 'multi_auth.user-id': multiAuthUserIdCookie } = cookie.parse(document.cookie)
|
const { 'multi_auth.user-id': multiAuthUserIdCookie } = cookie.parse(document.cookie)
|
||||||
if (!multiAuthUserIdCookie) return false
|
|
||||||
setIsAnon(multiAuthUserIdCookie === 'anonymous')
|
setIsAnon(multiAuthUserIdCookie === 'anonymous')
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue