2
0

fix: 🐛 jump to login for no reason

This commit is contained in:
Baptiste Arnaud
2022-04-06 19:21:19 +02:00
parent eb4feb61bd
commit 25961d32fc

View File

@ -55,7 +55,7 @@ export const UserContext = ({ children }: { children: ReactNode }) => {
useEffect(() => { useEffect(() => {
if (!router.isReady) return if (!router.isReady) return
if (status === 'loading') return if (status === 'loading') return
if (status === 'unauthenticated' && !isSigningIn()) if (!user && status === 'unauthenticated' && !isSigningIn())
router.replace({ router.replace({
pathname: '/signin', pathname: '/signin',
query: query: