FE Auth vendor changes (#270)

This commit is contained in:
Kerem Yilmaz
2024-05-07 11:31:05 -07:00
committed by GitHub
parent 0862232db4
commit 5ce37dfaaf
16 changed files with 99 additions and 32 deletions

View File

@@ -7,11 +7,7 @@ import { Profile } from "./Profile";
import { useContext } from "react";
import { UserContext } from "@/store/UserContext";
type Props = {
onLogout?: () => void;
};
function RootLayout({ onLogout }: Props) {
function RootLayout() {
const user = useContext(UserContext);
return (
@@ -30,7 +26,7 @@ function RootLayout({ onLogout }: Props) {
<SideNav />
{user ? (
<div className="absolute bottom-2 left-0 w-72 px-6 shrink-0">
<Profile name={user.name} onLogout={onLogout} />
<Profile name={user.name} />
</div>
) : null}
</aside>