File tree Expand file tree Collapse file tree 2 files changed +15
-12
lines changed
Expand file tree Collapse file tree 2 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,10 @@ export const useResponsiveTabLayout = ({
4242 const gap = 4 ; // gap-1 = 4px
4343 const overflowButtonWidth = 40 ;
4444
45+ const container = containerRef ?. current ;
46+
4547 // ResizeObserver to measure container width
4648 useEffect ( ( ) => {
47- const container = containerRef . current ;
4849 if ( ! container ) return ;
4950
5051 const resizeObserver = new ResizeObserver ( ( entries ) => {
@@ -58,7 +59,7 @@ export const useResponsiveTabLayout = ({
5859 return ( ) => {
5960 resizeObserver . disconnect ( ) ;
6061 } ;
61- } , [ ] ) ;
62+ } , [ container ] ) ;
6263
6364 // Calculate how many items can fit
6465 useEffect ( ( ) => {
Original file line number Diff line number Diff line change @@ -49,16 +49,18 @@ export const SidebarWrapper = observer(function SidebarWrapper(props: TSidebarWr
4949
5050 < div className = "flex items-center justify-between gap-2 px-2" >
5151 < span className = "text-md text-custom-text-200 font-medium pt-1" > { title } </ span >
52- < div className = "flex items-center gap-2" >
53- < button
54- type = "button"
55- className = "flex items-center justify-center size-6 rounded-md text-custom-text-400 hover:text-custom-primary-100 hover:bg-custom-background-90"
56- onClick = { ( ) => setIsCustomizeNavDialogOpen ( true ) }
57- >
58- < PreferencesIcon className = "size-4" />
59- </ button >
60- < AppSidebarToggleButton />
61- </ div >
52+ { title === "Projects" && (
53+ < div className = "flex items-center gap-2" >
54+ < button
55+ type = "button"
56+ className = "flex items-center justify-center size-6 rounded-md text-custom-text-400 hover:text-custom-primary-100 hover:bg-custom-background-90"
57+ onClick = { ( ) => setIsCustomizeNavDialogOpen ( true ) }
58+ >
59+ < PreferencesIcon className = "size-4" />
60+ </ button >
61+ < AppSidebarToggleButton />
62+ </ div >
63+ ) }
6264 </ div >
6365 { /* Quick actions */ }
6466 { quickActions }
You can’t perform that action at this time.
0 commit comments