Answers for "next js redirect if not logged in"

0

next js redirect if not logged in

useEffect(() => {
  if (userData.email) {
    router.push('/redirect') // redirects if there is no user
  }
}, [userData])
Posted by: Guest on April-12-2021

Code answers related to "next js redirect if not logged in"

Code answers related to "Javascript"

Browse Popular Code Answers by Language