({
children,
}: Readonly<{
children: React.ReactNode;
}>)
| 36 | }; |
| 37 | |
| 38 | export default async function RootLayout({ |
| 39 | children, |
| 40 | }: Readonly<{ |
| 41 | children: React.ReactNode; |
| 42 | }>) { |
| 43 | const entitlements = await getEntitlements(); |
| 44 | const identityProviders = await getIdentityProviderMetadata(); |
| 45 | |
| 46 | return ( |
| 47 | <html |
| 48 | lang="en" |
| 49 | // @see : https://github.com/pacocoursey/next-themes?tab=readme-ov-file#with-app |
| 50 | suppressHydrationWarning |
| 51 | > |
| 52 | <head> |
| 53 | {env.NODE_ENV === "development" && env.DEBUG_ENABLE_REACT_SCAN === 'true' && ( |
| 54 | <Script |
| 55 | src="//unpkg.com/react-scan/dist/auto.global.js" |
| 56 | crossOrigin="anonymous" |
| 57 | strategy="beforeInteractive" |
| 58 | /> |
| 59 | )} |
| 60 | {env.NODE_ENV === "development" && env.DEBUG_ENABLE_REACT_GRAB === 'true' && ( |
| 61 | <Script |
| 62 | src="//unpkg.com/react-grab/dist/index.global.js" |
| 63 | crossOrigin="anonymous" |
| 64 | strategy="beforeInteractive" |
| 65 | /> |
| 66 | )} |
| 67 | {env.NODE_ENV === "development" && env.DEBUG_ENABLE_REACT_GRAB === 'true' && ( |
| 68 | <Script |
| 69 | src="//unpkg.com/@react-grab/mcp/dist/client.global.js" |
| 70 | strategy="lazyOnload" |
| 71 | /> |
| 72 | )} |
| 73 | </head> |
| 74 | <body> |
| 75 | <Toaster /> |
| 76 | <SessionProvider> |
| 77 | <PlanProvider entitlements={entitlements}> |
| 78 | <IdentityProvidersProvider providers={identityProviders}> |
| 79 | <PostHogProvider |
| 80 | isDisabled={env.SOURCEBOT_TELEMETRY_DISABLED === 'true'} |
| 81 | isPiiEnabled={env.SOURCEBOT_TELEMETRY_PII_COLLECTION_ENABLED === 'true'} |
| 82 | // @note: the posthog api key doesn't need to be kept secret, |
| 83 | // so we are safe to send it to the client. |
| 84 | posthogApiKey={env.POSTHOG_PAPIK} |
| 85 | sourcebotVersion={SOURCEBOT_VERSION} |
| 86 | sourcebotInstallId={env.SOURCEBOT_INSTALL_ID} |
| 87 | > |
| 88 | <ThemeProvider |
| 89 | attribute="class" |
| 90 | defaultTheme="system" |
| 91 | enableSystem |
| 92 | disableTransitionOnChange |
| 93 | > |
| 94 | <QueryClientProvider> |
| 95 | <TooltipProvider> |
nothing calls this directly
no test coverage detected