import React from "react"; import Link from "next/link"; import { useRouter } from "next/router"; import { signOut, useSession } from "next-auth/react"; const Header = () => { const router = useRouter(); const isActive: (pathname: string) => boolean = (pathname) => router.pathname === pathname; const {data: session, status} = useSession(); let left = (
); let right = null; if (status === 'loading') { left = ( ); right = (Validating session ...
{session.user.name} ({session.user.email})