Skip to content

Commit

Permalink
Update login to work with new api (#966)
Browse files Browse the repository at this point in the history
  • Loading branch information
majakomel authored Oct 11, 2024
1 parent 26c90d3 commit ca55e5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pages/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit ca55e5f

Please sign in to comment.