@@ -46,20 +46,10 @@ export const SidebarDropdown = observer(() => {
4646 // popper-js init
4747 const { styles, attributes } = usePopper ( referenceElement , popperElement , {
4848 placement : "right" ,
49- modifiers : [
50- {
51- name : "preventOverflow" ,
52- options : {
53- padding : 12 ,
54- } ,
55- } ,
56- ] ,
49+ modifiers : [ { name : "preventOverflow" , options : { padding : 12 } } ] ,
5750 } ) ;
5851
59- const handleWorkspaceNavigation = ( workspace : IWorkspace ) =>
60- updateUserProfile ( {
61- last_workspace_id : workspace ?. id ,
62- } ) ;
52+ const handleWorkspaceNavigation = ( workspace : IWorkspace ) => updateUserProfile ( { last_workspace_id : workspace ?. id } ) ;
6353
6454 const handleSignOut = async ( ) => {
6555 await signOut ( ) . catch ( ( ) =>
@@ -86,14 +76,12 @@ export const SidebarDropdown = observer(() => {
8676 "flex-grow-0 justify-center" : sidebarCollapsed ,
8777 } ) }
8878 >
89- { ( { open } ) => (
79+ { ( { open, close } ) => (
9080 < >
9181 < Menu . Button
9282 className = { cn (
9383 "group/menu-button flex items-center justify-between gap-1 p-1 truncate rounded text-sm font-medium text-custom-sidebar-text-200 hover:bg-custom-sidebar-background-80 focus:outline-none" ,
94- {
95- "flex-grow" : ! sidebarCollapsed ,
96- }
84+ { "flex-grow" : ! sidebarCollapsed }
9785 ) }
9886 >
9987 < div className = "flex-grow flex items-center gap-2 truncate" >
@@ -108,9 +96,7 @@ export const SidebarDropdown = observer(() => {
10896 < ChevronDown
10997 className = { cn (
11098 "flex-shrink-0 mx-1 hidden size-4 group-hover/menu-button:block text-custom-sidebar-text-400 duration-300" ,
111- {
112- "rotate-180" : open ,
113- }
99+ { "rotate-180" : open }
114100 ) }
115101 />
116102 ) }
@@ -145,6 +131,7 @@ export const SidebarDropdown = observer(() => {
145131 activeWorkspace = { activeWorkspace }
146132 handleItemClick = { handleItemClick }
147133 handleWorkspaceNavigation = { handleWorkspaceNavigation }
134+ handleClose = { close }
148135 />
149136 ) ) }
150137 </ div >
0 commit comments