Skip to content

Commit 621eada

Browse files
authored
Fix resizeable panels (supabase#40950)
* Fix resizeable panels * Clean up
1 parent 96fb9fb commit 621eada

File tree

1 file changed

+8
-5
lines changed
  • apps/studio/components/layouts/ProjectLayout/LayoutSidebar

1 file changed

+8
-5
lines changed

apps/studio/components/layouts/ProjectLayout/LayoutSidebar/index.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,23 @@ export const LayoutSidebar = ({
1818
}: LayoutSidebarProps) => {
1919
const { activeSidebar } = useSidebarManagerSnapshot()
2020

21+
if (!activeSidebar?.component) return null
22+
2123
return (
2224
<>
2325
<ResizableHandle withHandle />
2426
<ResizablePanel
2527
id="panel-side"
2628
key={activeSidebar?.id ?? 'default'}
2729
order={order}
28-
defaultSize={!!activeSidebar?.component ? defaultSize : 0}
29-
minSize={!!activeSidebar?.component ? minSize : 0}
30-
maxSize={!!activeSidebar?.component ? maxSize : 0}
30+
defaultSize={defaultSize}
31+
minSize={minSize}
32+
maxSize={maxSize}
3133
className={cn(
3234
'border-l bg fixed z-40 right-0 top-0 bottom-0',
33-
'w-screen h-[100dvh]',
34-
'md:absolute md:h-auto md:w-3/4',
35+
'h-[100dvh]',
36+
'md:absolute md:h-auto md:w-1/2',
37+
'lg:w-2/5',
3538
'xl:relative xl:border-l-0'
3639
)}
3740
>

0 commit comments

Comments
 (0)