@@ -30,36 +30,52 @@ type Tab = ComponentProps<typeof MainNavTabs>["tabs"][number] & {
3030 children : ReactNode ;
3131} ;
3232
33- type Props = AppBodyProps & {
33+ type AppShellRootProps = {
3434 enableAccessibilityReporting : boolean ;
3535 amplitudeApiKey ?: string | undefined ;
3636 googleAnalyticsId ?: string | undefined ;
3737 providers ?: ComponentProps < typeof ComposeProviders > [ "providers" ] | undefined ;
38+ children : ReactNode ;
3839} ;
3940
40- export const AppShell = ( {
41+ export const AppShellRoot = ( {
4142 enableAccessibilityReporting,
4243 amplitudeApiKey,
4344 googleAnalyticsId,
4445 providers,
45- ... props
46- } : Props ) => (
46+ children ,
47+ } : AppShellRootProps ) => (
4748 < RootProviders providers = { providers } >
4849 < HtmlWithLang
4950 // See https://github.com/pacocoursey/next-themes?tab=readme-ov-file#with-app
5051 suppressHydrationWarning
5152 className = { clsx ( sans . className , styles . html ) }
5253 >
53- < body className = { styles . body } >
54- < AppBody { ...props } />
55- </ body >
54+ < body className = { styles . body } > { children } </ body >
5655 { googleAnalyticsId && < GoogleAnalytics gaId = { googleAnalyticsId } /> }
5756 { amplitudeApiKey && < Amplitude apiKey = { amplitudeApiKey } /> }
5857 { enableAccessibilityReporting && < ReportAccessibility /> }
5958 </ HtmlWithLang >
6059 </ RootProviders >
6160) ;
6261
62+ export const AppShell = ( {
63+ enableAccessibilityReporting,
64+ amplitudeApiKey,
65+ googleAnalyticsId,
66+ providers,
67+ ...props
68+ } : AppShellRootProps & AppBodyProps ) => (
69+ < AppShellRoot
70+ enableAccessibilityReporting = { enableAccessibilityReporting }
71+ amplitudeApiKey = { amplitudeApiKey }
72+ googleAnalyticsId = { googleAnalyticsId }
73+ providers = { providers }
74+ >
75+ < AppBody { ...props } />
76+ </ AppShellRoot >
77+ ) ;
78+
6379type AppBodyProps = Pick <
6480 ComponentProps < typeof Header > ,
6581 "appName" | "mainCta" | "extraCta" | "displaySupportButton"
0 commit comments