@@ -6,12 +6,16 @@ import {
66 Home ,
77 FileText ,
88 ListChecks ,
9- Menu , // ✅ add hamburger icon
9+ Menu ,
1010 LogOut ,
1111} from "lucide-react" ;
1212import { Button } from "@/components/ui/button" ;
1313import { ScrollArea } from "@/components/ui/scroll-area" ;
14- import { Sheet , SheetContent , SheetTrigger } from "@/components/ui/sheet" ;
14+ import {
15+ Sheet ,
16+ SheetContent ,
17+ SheetTrigger ,
18+ } from "@/components/ui/sheet" ;
1519import { KEYWORDS } from "@/constant" ;
1620
1721type NavItem = {
@@ -30,22 +34,17 @@ const navItems: NavItem[] = [
3034
3135function NavLink ( { item, active } : { item : NavItem ; active ?: boolean } ) {
3236 const Icon = item . icon ;
33-
34- const baseClasses = "flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors" ;
35- const normalClasses = active
36- ? "bg-accent text-accent-foreground"
37- : "text-muted-foreground hover:bg-accent hover:text-accent-foreground" ;
38- const logoutClasses = "text-red-600 hover:bg-red-50 hover:text-red-700" ;
39-
40- const className = cn (
41- baseClasses ,
42- item . isLogout ? logoutClasses : normalClasses
43- ) ;
4437
4538 return (
4639 < a
4740 href = { item . href }
48- className = { className }
41+ className = { cn (
42+ "flex items-center gap-3 rounded-md px-3 py-2 text-sm transition-colors" ,
43+ active
44+ ? "bg-accent text-accent-foreground"
45+ : "text-muted-foreground hover:bg-accent hover:text-accent-foreground" ,
46+ item . isLogout && "text-red-600 hover:bg-red-50 hover:text-red-700"
47+ ) }
4948 >
5049 < span className = "flex h-8 w-8 items-center justify-center rounded-md border bg-muted" >
5150 < Icon className = "h-4 w-4" />
@@ -56,9 +55,6 @@ function NavLink({ item, active }: { item: NavItem; active?: boolean }) {
5655}
5756
5857export function Sidebar ( ) {
59- const [ open , setOpen ] = React . useState ( false ) ;
60-
61- // Determine active path (works without react-router)
6258 const activePath =
6359 typeof window !== "undefined"
6460 ? window . location . pathname . replace ( / \/ + $ / , "" ) || "/"
@@ -71,19 +67,18 @@ export function Sidebar() {
7167
7268 return (
7369 < div className = "flex" >
74- { /* Mobile hamburger trigger */ }
70+ { /* Mobile: hamburger trigger */ }
7571 < div className = "lg:hidden p-2" >
76- < Sheet open = { open } onOpenChange = { setOpen } >
72+ < Sheet >
7773 < SheetTrigger asChild >
7874 < Button variant = "outline" size = "icon" >
79- { /* ✅ icon-only button */ }
8075 < Menu className = "h-5 w-5" />
8176 < span className = "sr-only" > Open Menu</ span >
8277 </ Button >
8378 </ SheetTrigger >
84- < SheetContent side = "left" className = "w-72 p-0" >
79+ < SheetContent side = "left" className = "w-72 p-0 bg-background " >
8580 < div className = "p-4 border-b" >
86- < div className = "text-sm text-muted-foreground" > Welcome </ div >
81+ < div className = "text-sm text-muted-foreground" > Current Team </ div >
8782 < div className = "font-semibold" > { KEYWORDS . name } </ div >
8883 </ div >
8984 < ScrollArea className = "h-full px-2 py-4" >
@@ -101,11 +96,11 @@ export function Sidebar() {
10196 </ Sheet >
10297 </ div >
10398
104- { /* Desktop sidebar */ }
105- < aside className = "hidden lg:flex lg:flex-col lg:w-64 shrink-0 border-r bg-muted/30 h-[100dvh] sticky top-0" >
99+ { /* Desktop: persistent sidebar */ }
100+ < aside className = "hidden lg:flex lg:flex-col lg:w-64 shrink-0 border-r bg-background h-[100dvh] sticky top-0" >
106101 < div className = "px-5 pt-6 pb-4 border-b" >
107102 < div className = "text-xs uppercase tracking-wide text-muted-foreground" >
108- Welcome
103+ Current Team
109104 </ div >
110105 < div className = "mt-1 text-base font-semibold" > { KEYWORDS . name } </ div >
111106 </ div >
0 commit comments