From ca55e5f449391d214ca2887fc75dbd82e6aab3f1 Mon Sep 17 00:00:00 2001 From: Maja Date: Fri, 11 Oct 2024 13:15:13 +0200 Subject: [PATCH] Update login to work with new api (#966) --- pages/login.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/login.js b/pages/login.js index cba440c5..0b3d4553 100644 --- a/pages/login.js +++ b/pages/login.js @@ -20,7 +20,7 @@ const Login = () => { // If user is already logged in, redirect to home page useEffect(() => { - if (!loading && user && !token) { + if (!loading && user?.logged_in && !token) { router.replace('/') } }, [user, loading, router, token])