I am using Auth0 Next JS SDK in my brand new Next JS app. However, I am facing the below issue while signing in and signing out
Any idea how to resolve this ? below is my code on the index page
import { useUser } from "@auth0/nextjs-auth0";
import Link from "next/link";
function Home() {
const { user } = useUser();
return (
<div>
{user ? (
<p>
Welcome {user.name}!{" "}
<Link href="/api/auth/logout">
<a>Logout</a>
</Link>
</p>
) : (
<Link href="/api/auth/login">
<a>Login</a>
</Link>
)}
</div>
);
}
export default Home;