@@ -545,6 +545,7 @@ function SidebarLogo() {
545545 const { mutateAsync : setDefaultOrganization , isPending : isSettingDefault } =
546546 api . organization . setDefault . useMutation ( ) ;
547547 const { isMobile } = useSidebar ( ) ;
548+ const isCollapsed = state === "collapsed" && ! isMobile ;
548549 const { data : activeOrganization } = api . organization . active . useQuery ( ) ;
549550
550551 const { data : invitations , refetch : refetchInvitations } =
@@ -570,27 +571,25 @@ function SidebarLogo() {
570571 < SidebarMenu
571572 className = { cn (
572573 "flex gap-2" ,
573- state === "collapsed"
574- ? "flex-col"
575- : "flex-row justify-between items-center" ,
574+ isCollapsed ? "flex-col" : "flex-row justify-between items-center" ,
576575 ) }
577576 >
578577 { /* Organization Logo and Selector */ }
579578 < SidebarMenuItem className = { "w-full" } >
580579 < DropdownMenu >
581580 < DropdownMenuTrigger asChild >
582581 < SidebarMenuButton
583- size = { state === "collapsed" ? "sm" : "lg" }
582+ size = { isCollapsed ? "sm" : "lg" }
584583 className = { cn (
585584 "data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground" ,
586- state === "collapsed" &&
585+ isCollapsed &&
587586 "flex justify-center items-center p-2 h-10 w-10 mx-auto" ,
588587 ) }
589588 >
590589 < div
591590 className = { cn (
592591 "flex items-center gap-2" ,
593- state === "collapsed" && "justify-center" ,
592+ isCollapsed && "justify-center" ,
594593 ) }
595594 >
596595 < div
@@ -602,15 +601,15 @@ function SidebarLogo() {
602601 < Logo
603602 className = { cn (
604603 "transition-all" ,
605- state === "collapsed" ? "size-4" : "size-5" ,
604+ isCollapsed ? "size-4" : "size-5" ,
606605 ) }
607606 logoUrl = { activeOrganization ?. logo || undefined }
608607 />
609608 </ div >
610609 < div
611610 className = { cn (
612611 "flex flex-col items-start" ,
613- state === "collapsed" && "hidden" ,
612+ isCollapsed && "hidden" ,
614613 ) }
615614 >
616615 < p className = "text-sm font-medium leading-none" >
@@ -619,7 +618,7 @@ function SidebarLogo() {
619618 </ div >
620619 </ div >
621620 < ChevronsUpDown
622- className = { cn ( "ml-auto" , state === "collapsed" && "hidden" ) }
621+ className = { cn ( "ml-auto" , isCollapsed && "hidden" ) }
623622 />
624623 </ SidebarMenuButton >
625624 </ DropdownMenuTrigger >
@@ -768,15 +767,15 @@ function SidebarLogo() {
768767 </ SidebarMenuItem >
769768
770769 { /* Notification Bell */ }
771- < SidebarMenuItem className = { cn ( state === "collapsed" && "mt-2" ) } >
770+ < SidebarMenuItem className = { cn ( isCollapsed && "mt-2" ) } >
772771 < DropdownMenu >
773772 < DropdownMenuTrigger asChild >
774773 < Button
775774 variant = "ghost"
776775 size = "icon"
777776 className = { cn (
778777 "relative" ,
779- state === "collapsed" && "h-8 w-8 p-1.5 mx-auto" ,
778+ isCollapsed && "h-8 w-8 p-1.5 mx-auto" ,
780779 ) }
781780 >
782781 < Bell className = "size-4" />
@@ -1145,14 +1144,9 @@ export default function Page({ children }: Props) {
11451144 </ div >
11461145 ) }
11471146 { dokployVersion && (
1148- < >
1149- < div className = "px-3 text-xs text-muted-foreground text-center group-data-[collapsible=icon]:hidden" >
1150- Version { dokployVersion }
1151- </ div >
1152- < div className = "hidden text-xs text-muted-foreground text-center group-data-[collapsible=icon]:block" >
1153- { dokployVersion }
1154- </ div >
1155- </ >
1147+ < div className = "px-3 text-xs text-muted-foreground text-center group-data-[collapsible=icon]:hidden" >
1148+ Version { dokployVersion }
1149+ </ div >
11561150 ) }
11571151 </ SidebarMenu >
11581152 </ SidebarFooter >
0 commit comments