From 25961d32fcc629bd1e9920d5d926b0d8d0a73645 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Wed, 6 Apr 2022 19:21:19 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20jump=20to=20login=20for?= =?UTF-8?q?=20no=20reason?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/builder/contexts/UserContext.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/builder/contexts/UserContext.tsx b/apps/builder/contexts/UserContext.tsx index 56147b5b5..afbbc3884 100644 --- a/apps/builder/contexts/UserContext.tsx +++ b/apps/builder/contexts/UserContext.tsx @@ -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: