mirror of
https://github.com/supabase/supabase.git
synced 2026-10-13 05:09:12 +03:00
* sidebar-manager * storage keys * tests * more ai spots * test fix * revert to default * remove ref * Update apps/studio/state/sidebar-manager-state.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update apps/studio/components/ui/AIAssistantPanel/AIAssistant.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix ts * fix * fux * fux query param * clean * fix * more * mock local storage * simplify * remove provider test * remve useopensidebar * fix(new homepage): open ai assistant on advisor card button clicks * Update apps/studio/components/layouts/ProjectLayout/LayoutSidebar/index.tsx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * Update apps/studio/state/sidebar-manager-state.tsx Co-authored-by: Charis <26616127+charislam@users.noreply.github.com> * refine * FIX --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Charis Lam <26616127+charislam@users.noreply.github.com>
33 lines
818 B
TypeScript
33 lines
818 B
TypeScript
import { Fragment } from 'react'
|
|
import { useSidebarManagerSnapshot } from 'state/sidebar-manager-state'
|
|
import { ResizableHandle, ResizablePanel, cn } from 'ui'
|
|
|
|
export const LayoutSidebar = () => {
|
|
const { activeSidebar } = useSidebarManagerSnapshot()
|
|
|
|
if (!activeSidebar?.component) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<Fragment>
|
|
<ResizableHandle withHandle />
|
|
<ResizablePanel
|
|
id="panel-side"
|
|
key={activeSidebar.id}
|
|
defaultSize={30}
|
|
minSize={30}
|
|
maxSize={50}
|
|
className={cn(
|
|
'border-l bg fixed z-40 right-0 top-0 bottom-0',
|
|
'w-screen h-[100dvh]',
|
|
'md:absolute md:h-auto md:w-3/4',
|
|
'xl:relative xl:border-l-0'
|
|
)}
|
|
>
|
|
{activeSidebar.component()}
|
|
</ResizablePanel>
|
|
</Fragment>
|
|
)
|
|
}
|