import { useUserContext } from "@/app/layout"; import { EventHandler } from "react"; import Login from "./login"; import Logout from "./logout"; interface AuthenticationProperties { onLogin: EventHandler; } export default function Authentication({ onLogin }: AuthenticationProperties) { const user = useUserContext(); return ( {!user.isAuthenticated ? ( ) : ( )} ); }