import { withPageAuthRequired } from "@auth0/nextjs-auth0/client"; import Layout from "../components/layout"; import { User } from "../interfaces"; type ProfileCardProps = { user: User; }; const ProfileCard = ({ user }: ProfileCardProps) => { return ( <>

Profile

Profile (client rendered)

user picture

nickname: {user.nickname}

name: {user.name}

); }; const Profile = ({ user, isLoading }) => { return ( {isLoading ? <>Loading... : } ); }; // Protected route, checking user authentication client-side.(CSR) export default withPageAuthRequired(Profile);