fix: 🐛 jump to login for no reason
This commit is contained in:
@ -55,7 +55,7 @@ export const UserContext = ({ children }: { children: ReactNode }) => {
|
||||
useEffect(() => {
|
||||
if (!router.isReady) return
|
||||
if (status === 'loading') return
|
||||
if (status === 'unauthenticated' && !isSigningIn())
|
||||
if (!user && status === 'unauthenticated' && !isSigningIn())
|
||||
router.replace({
|
||||
pathname: '/signin',
|
||||
query:
|
||||
|
Reference in New Issue
Block a user