mirror of
https://github.com/supabase/supabase.git
synced 2026-10-19 08:09:11 +03:00
44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
import { CommandMenuProvider } from '@ui-patterns/Cmdk'
|
|
import PromoToast from '@ui-patterns/PromoToast'
|
|
import { ThemeProvider } from 'common'
|
|
import { PortalToast } from 'ui'
|
|
import { type PropsWithChildren } from 'react'
|
|
|
|
import SiteLayout from '~/layouts/SiteLayout'
|
|
import { AuthContainer } from './auth/auth.client'
|
|
import { QueryClientProvider } from './data/queryClient.client'
|
|
import { ShortcutPreviewBuild } from './envs/staging.client'
|
|
import { PageTelemetry } from './telemetry/telemetry.client'
|
|
import { ScrollRestoration } from './ui/helpers.scroll.client'
|
|
import { ThemeSandbox } from './ui/theme.client'
|
|
|
|
/**
|
|
* Global providers that wrap the entire app
|
|
*/
|
|
function GlobalProviders({ children }: PropsWithChildren) {
|
|
return (
|
|
<ShortcutPreviewBuild>
|
|
<QueryClientProvider>
|
|
<AuthContainer>
|
|
<PageTelemetry />
|
|
<ScrollRestoration />
|
|
<ThemeProvider defaultTheme="system" enableSystem disableTransitionOnChange>
|
|
<CommandMenuProvider site="docs">
|
|
<div className="h-screen flex flex-col">
|
|
<SiteLayout>
|
|
<PortalToast />
|
|
<PromoToast />
|
|
{children}
|
|
</SiteLayout>
|
|
<ThemeSandbox />
|
|
</div>
|
|
</CommandMenuProvider>
|
|
</ThemeProvider>
|
|
</AuthContainer>
|
|
</QueryClientProvider>
|
|
</ShortcutPreviewBuild>
|
|
)
|
|
}
|
|
|
|
export { GlobalProviders }
|