mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 15:19:08 +03:00
* Add admoniton in Connect UI for transaction pooling section if pooling mode is Session * Add callout in session pooler to use port 5432 * Update to use Panel.Notice * Add callout to use port 5432 for session in pooling configuration settings * Update warning when setting to txn mode from session * Minor refactors --------- Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
49 lines
1.7 KiB
TypeScript
49 lines
1.7 KiB
TypeScript
import { PropsWithChildren } from 'react'
|
|
|
|
import { useParams } from 'common'
|
|
import { AppBannerWrapper } from 'components/interfaces/App'
|
|
import { AppBannerContextProvider } from 'components/interfaces/App/AppBannerWrapperContext'
|
|
import { LayoutHeader } from './ProjectLayout/LayoutHeader'
|
|
import MobileNavigationBar from './ProjectLayout/NavigationBar/MobileNavigationBar'
|
|
import NavigationBar from './ProjectLayout/NavigationBar/NavigationBar'
|
|
import { ProjectContextProvider } from './ProjectLayout/ProjectContext'
|
|
|
|
export interface DefaultLayoutProps {
|
|
title?: string
|
|
product?: string
|
|
selectedTable?: string
|
|
hasProductMenu?: boolean
|
|
// Shows header in the top left of the page
|
|
headerTitle?: string
|
|
showProductMenu?: boolean
|
|
}
|
|
|
|
const DefaultLayout = ({ children, showProductMenu }: PropsWithChildren<DefaultLayoutProps>) => {
|
|
const { ref } = useParams()
|
|
return (
|
|
<>
|
|
<ProjectContextProvider projectRef={ref}>
|
|
<AppBannerContextProvider>
|
|
<div className="flex flex-col h-screen w-screen">
|
|
{/* Top Banner */}
|
|
<AppBannerWrapper />
|
|
<div className="flex-shrink-0">
|
|
<MobileNavigationBar />
|
|
<LayoutHeader showProductMenu={showProductMenu} />
|
|
</div>
|
|
{/* Main Content Area */}
|
|
<div className="flex flex-1 w-full overflow-y-hidden">
|
|
{/* Sidebar */}
|
|
<NavigationBar />
|
|
{/* Main Content */}
|
|
<div className="flex-grow h-full overflow-y-auto">{children}</div>
|
|
</div>
|
|
</div>
|
|
</AppBannerContextProvider>
|
|
</ProjectContextProvider>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default DefaultLayout
|