11import { Link } from "@tanstack/react-router" ;
22import { Separator } from "./ui/separator" ;
33import { DashboardBreadcrumb } from "@/components/dashboard-breadcrumb" ;
4+ import { Button } from "./ui/button" ;
5+ import { Avatar , AvatarFallback , AvatarImage } from "./ui/avatar" ;
6+ import {
7+ DropdownMenu ,
8+ DropdownMenuContent ,
9+ DropdownMenuGroup ,
10+ DropdownMenuItem ,
11+ DropdownMenuLabel ,
12+ DropdownMenuSeparator ,
13+ DropdownMenuTrigger ,
14+ } from "./ui/dropdown-menu" ;
15+ import { LogOut , User , Settings } from "lucide-react" ;
416
517export function AppNavbar ( ) {
618 return (
@@ -22,7 +34,7 @@ export function AppNavbar() {
2234 < DashboardBreadcrumb />
2335 </ div >
2436
25- < div className = "ml-auto flex items-center gap-1 " >
37+ < div className = "ml-auto flex items-center gap-4 " >
2638 < Link
2739 to = "/feed"
2840 activeProps = { {
@@ -47,6 +59,45 @@ export function AppNavbar() {
4759 >
4860 Config
4961 </ Link >
62+
63+ < Separator orientation = "vertical" className = "h-8 opacity-30" />
64+
65+ < DropdownMenu >
66+ < DropdownMenuTrigger asChild >
67+ < Button variant = "ghost" className = "relative h-8 w-8 rounded-full" >
68+ < Avatar className = "h-8 w-8" >
69+ < AvatarImage src = "/avatars/01.png" alt = "@username" />
70+ < AvatarFallback > HD</ AvatarFallback >
71+ </ Avatar >
72+ </ Button >
73+ </ DropdownMenuTrigger >
74+ < DropdownMenuContent className = "w-56" align = "end" forceMount >
75+ < DropdownMenuLabel className = "font-normal" >
76+ < div className = "flex flex-col space-y-1" >
77+ < p className = "text-sm font-medium leading-none" > Henry Dowling</ p >
78+ < p className = "text-xs leading-none text-muted-foreground" >
79+ 80+ </ p >
81+ </ div >
82+ </ DropdownMenuLabel >
83+ < DropdownMenuSeparator />
84+ < DropdownMenuGroup >
85+ < DropdownMenuItem >
86+ < User className = "mr-2 h-4 w-4" />
87+ < span > Profile</ span >
88+ </ DropdownMenuItem >
89+ < DropdownMenuItem >
90+ < Settings className = "mr-2 h-4 w-4" />
91+ < span > Settings</ span >
92+ </ DropdownMenuItem >
93+ </ DropdownMenuGroup >
94+ < DropdownMenuSeparator />
95+ < DropdownMenuItem className = "text-red-600" >
96+ < LogOut className = "mr-2 h-4 w-4" />
97+ < span > Sign out</ span >
98+ </ DropdownMenuItem >
99+ </ DropdownMenuContent >
100+ </ DropdownMenu >
50101 </ div >
51102 </ div >
52103 </ header >
0 commit comments