@@ -155,48 +155,52 @@ export function Navbar({ notificationsWire }: { notificationsWire: string }) {
155155
156156 < OrgSwitcher />
157157
158- < svg
159- height = "16"
160- strokeLinejoin = "round"
161- viewBox = "0 0 16 16"
162- width = "16"
163- className = "hidden md:block text-neutral-300 dark:text-neutral-600 w-5 h-5 mr-1"
164- >
165- < path
166- fillRule = "evenodd"
167- clipRule = "evenodd"
168- d = "M4.01526 15.3939L4.3107 14.7046L10.3107 0.704556L10.6061 0.0151978L11.9849 0.606077L11.6894 1.29544L5.68942 15.2954L5.39398 15.9848L4.01526 15.3939Z"
169- fill = "currentColor"
170- />
171- </ svg >
172-
173- < DropdownMenu >
174- < DropdownMenuTrigger asChild >
175- < Button
176- variant = "ghost"
177- className = "flex items-center p-1.5"
178- size = "sm"
158+ { projects . length > 0 && (
159+ < >
160+ < svg
161+ height = "16"
162+ strokeLinejoin = "round"
163+ viewBox = "0 0 16 16"
164+ width = "16"
165+ className = "hidden md:block text-neutral-300 dark:text-neutral-600 w-5 h-5 mr-1"
179166 >
180- < span className = "text-sm text-neutral-500 dark:text-neutral-400" >
181- { activeProject ?. name || "Projects" }
182- </ span >
183- < ChevronDown className = "h-4 w-4 text-muted-foreground" />
184- </ Button >
185- </ DropdownMenuTrigger >
186- < DropdownMenuContent align = "start" className = "w-56" >
187- { projects . map ( ( project ) => (
188- < DropdownMenuItem
189- key = { project . id }
190- onClick = { ( ) =>
191- router . push ( `/${ tenant } /projects/${ project . id } ` )
192- }
193- className = "cursor-pointer"
194- >
195- < span > { project . name } </ span >
196- </ DropdownMenuItem >
197- ) ) }
198- </ DropdownMenuContent >
199- </ DropdownMenu >
167+ < path
168+ fillRule = "evenodd"
169+ clipRule = "evenodd"
170+ d = "M4.01526 15.3939L4.3107 14.7046L10.3107 0.704556L10.6061 0.0151978L11.9849 0.606077L11.6894 1.29544L5.68942 15.2954L5.39398 15.9848L4.01526 15.3939Z"
171+ fill = "currentColor"
172+ />
173+ </ svg >
174+
175+ < DropdownMenu >
176+ < DropdownMenuTrigger asChild >
177+ < Button
178+ variant = "ghost"
179+ className = "flex items-center p-1.5"
180+ size = "sm"
181+ >
182+ < span className = "text-sm text-neutral-500 dark:text-neutral-400" >
183+ { activeProject ?. name || "Projects" }
184+ </ span >
185+ < ChevronDown className = "h-4 w-4 text-muted-foreground" />
186+ </ Button >
187+ </ DropdownMenuTrigger >
188+ < DropdownMenuContent align = "start" className = "w-56" >
189+ { projects . map ( ( project ) => (
190+ < DropdownMenuItem
191+ key = { project . id }
192+ onClick = { ( ) =>
193+ router . push ( `/${ tenant } /projects/${ project . id } ` )
194+ }
195+ className = "cursor-pointer"
196+ >
197+ < span > { project . name } </ span >
198+ </ DropdownMenuItem >
199+ ) ) }
200+ </ DropdownMenuContent >
201+ </ DropdownMenu >
202+ </ >
203+ ) }
200204 </ div >
201205
202206 < div className = "ml-auto flex items-center space-x-1" >
0 commit comments