feat: user profile in navbar

This commit is contained in:
2026-01-21 09:48:12 +07:00
parent eae3b2b3fc
commit 19b15b89d2
4 changed files with 454 additions and 3 deletions

View File

@ -2,8 +2,12 @@
import Image from "next/image";
import NavigationLink from "./NavigationLink";
import SignIn from "./SignIn";
import { useAuth } from "@/shared/contexts/AuthContext";
import UserProfile from "./UserProfile";
const Navbar = () => {
const { session } = useAuth();
return (
<div className="absolute z-10 top-0 w-full h-16 flex items-center justify-between">
<div className="flex items-center">
@ -16,9 +20,7 @@ const Navbar = () => {
/>
<NavigationLink />
</div>
<div>
<SignIn />
</div>
<div>{session?.user ? <UserProfile /> : <SignIn />}</div>
</div>
);
};