import { withPageAuthRequired } from "@auth0/nextjs-auth0"; import Layout from "../../components/Old/layout"; import { User } from "../../interfaces"; type ProfileProps = { user: User; }; export default function Profile({ user }: ProfileProps) { return (

Profile

Profile (server rendered)

user picture

nickname: {user.nickname}

name: {user.name}

); } // Protected route, checking authentication status before rendering the page.(SSR) // It's slower than a static page with client side authentication export const getServerSideProps = withPageAuthRequired();