@@ -11,6 +11,9 @@ import { Accordion } from "@/components/Accordion";
1111import { membershipMocks } from "mocks/membershipMocks" ;
1212import { Avatar } from "@/components/Avatar" ;
1313import { Badge } from "@/components/ui/Badge" ;
14+ import { Switch } from "./inputs/Switch" ;
15+ import { useGlobalContext } from "@/contexts/GlobalContext" ;
16+ import { AuthWrapper } from "./AuthWrapper" ;
1417const renderNavItems = (
1518 _items : ( typeof MAIN_NAV_ITEMS ) [ keyof typeof MAIN_NAV_ITEMS ] ,
1619) =>
@@ -45,13 +48,13 @@ const NavItem = ({
4548 to = { to }
4649 key = { title }
4750 className = { cn (
48- "text-sm font-inter font-medium leading-5 text-black-secondary cursor-pointer outline-none focus:outline-none focus:ring-0 focus:ring-offset-0" ,
49- "duration-200 hover:bg-white-light hover:text-black " ,
51+ "text-sm font-inter font-medium leading-5 text-base-muted-foreground cursor-pointer outline-none focus:outline-none focus:ring-0 focus:ring-offset-0" ,
52+ "duration-200 hover:bg-muted hover:text-base-primary " ,
5053 "flex items-center gap-2 rounded-md h-9 py-2 w-full p-2" ,
5154 ) }
5255 >
5356 < div className = "flex items-center gap-2" >
54- < Icon className = "text-black text-base" size = { 16 } />
57+ < Icon className = " text-base" size = { 16 } />
5558 < span > { title } </ span >
5659 </ div >
5760 { badge && (
@@ -75,14 +78,13 @@ const SidebarContent = () => {
7578 return (
7679 < nav
7780 aria-label = "Sidebar Navigation"
78- className = "flex flex-col divide-y-[1px] divide-[#E5E7EB] "
81+ className = "flex flex-col divide-y-[1px] divide-sidebar-border "
7982 >
8083 < div className = "space-y-1 py-6" >
8184 < NavItem title = "Home" to = "/" icon = { HomeIcon } />
8285 { renderStartItems ( ) }
8386 { auth ?. mapSync ( renderStartItems ) }
8487 </ div >
85-
8688 < Accordion
8789 className = "py-6"
8890 items = { [
@@ -98,8 +100,8 @@ const SidebarContent = () => {
98100 params = { { id : `${ id } ` } }
99101 >
100102 < Avatar className = "!size-[32px] !rounded-lg" src = { logo } />
101- < span className = "font-semibold font-inter text-sm text-[#3F3F46] line-clamp-1" >
102- { name }
103+ < span className = "font-semibold font-inter text-sm text-sidebar-foreground line-clamp-1" >
104+ { name } ss
103105 </ span >
104106 </ Link >
105107 ) ) }
@@ -108,6 +110,7 @@ const SidebarContent = () => {
108110 } ,
109111 ] }
110112 />
113+
111114 { user !== undefined && (
112115 < div className = "space-y-2 py-6" >
113116 < div className = "w-full justify-start flex items-center space-x-3 text-sm" >
@@ -147,44 +150,52 @@ const LeftSidebar = () => {
147150 const { data : user } = useQuery ( [ "user.read" , auth ?. inner ?. username ] , {
148151 enabled : auth ?. isSome ( ) ,
149152 } ) ;
153+ const { isDarkMode, setIsDarkMode } = useGlobalContext ( ) ;
150154
151155 return (
152- < aside className = "w-[264px] p-6 bg-white-dark hidden flex-col sticky top-[60px] z-[49] lg:flex " >
156+ < aside className = "w-[264px] p-6 bg-sidebar-background hidden flex-col sticky top-[60px] z-[49] lg:flex " >
153157 < nav
154158 aria-label = "Sidebar Navigation"
155- className = "flex flex-col divide-y-[1px] divide-[#E5E7EB] "
159+ className = "flex flex-col divide-y-[1px] divide-sidebar-border "
156160 >
157161 < div className = "space-y-1 py-6" >
158162 < NavItem title = "Home" to = "/" icon = { HomeIcon } />
159- { renderStartItems ( ) }
160- { auth ?. mapSync ( renderStartItems ) }
163+ < AuthWrapper >
164+ { renderStartItems ( ) }
165+ { /* auth?.mapSync(renderStartItems) */ }
166+ </ AuthWrapper >
161167 </ div >
162168
163- < Accordion
164- className = "py-6"
165- items = { [
166- {
167- label : "MY COMMUNITIES" ,
168- children : (
169- < div className = "flex flex-col" >
170- { membershipMocks . map ( ( { id, name, logo } ) => (
171- < Link
172- key = { id }
173- to = "/communities/$id"
174- className = "flex gap-2 items-center py-2 px-3"
175- params = { { id : `${ id } ` } }
176- >
177- < Avatar className = "!size-[32px] !rounded-lg" src = { logo } />
178- < span className = "font-semibold font-inter text-sm text-[#3F3F46] line-clamp-1" >
179- { name }
180- </ span >
181- </ Link >
182- ) ) }
183- </ div >
184- ) ,
185- } ,
186- ] }
187- />
169+ < AuthWrapper >
170+ < Accordion
171+ className = "py-6"
172+ items = { [
173+ {
174+ label : "MY COMMUNITIES" ,
175+ children : (
176+ < div className = "flex flex-col" >
177+ { membershipMocks . map ( ( { id, name, logo } ) => (
178+ < Link
179+ key = { id }
180+ to = "/communities/$id"
181+ className = "flex gap-2 items-center py-2 px-3"
182+ params = { { id : `${ id } ` } }
183+ >
184+ < Avatar
185+ className = "!size-[32px] !rounded-lg"
186+ src = { logo }
187+ />
188+ < span className = "font-semibold font-inter text-sm text-sidebar-foreground line-clamp-1" >
189+ { name }
190+ </ span >
191+ </ Link >
192+ ) ) }
193+ </ div >
194+ ) ,
195+ } ,
196+ ] }
197+ />
198+ </ AuthWrapper >
188199 { user !== undefined && (
189200 < div className = "space-y-2 py-6" >
190201 < div className = "w-full justify-start flex items-center space-x-3 text-sm" >
0 commit comments