@@ -30,36 +30,52 @@ type Tab = ComponentProps<typeof MainNavTabs>["tabs"][number] & {
30
30
children : ReactNode ;
31
31
} ;
32
32
33
- type Props = AppBodyProps & {
33
+ type AppShellRootProps = {
34
34
enableAccessibilityReporting : boolean ;
35
35
amplitudeApiKey ?: string | undefined ;
36
36
googleAnalyticsId ?: string | undefined ;
37
37
providers ?: ComponentProps < typeof ComposeProviders > [ "providers" ] | undefined ;
38
+ children : ReactNode ;
38
39
} ;
39
40
40
- export const AppShell = ( {
41
+ export const AppShellRoot = ( {
41
42
enableAccessibilityReporting,
42
43
amplitudeApiKey,
43
44
googleAnalyticsId,
44
45
providers,
45
- ... props
46
- } : Props ) => (
46
+ children ,
47
+ } : AppShellRootProps ) => (
47
48
< RootProviders providers = { providers } >
48
49
< HtmlWithLang
49
50
// See https://github.com/pacocoursey/next-themes?tab=readme-ov-file#with-app
50
51
suppressHydrationWarning
51
52
className = { clsx ( sans . className , styles . html ) }
52
53
>
53
- < body className = { styles . body } >
54
- < AppBody { ...props } />
55
- </ body >
54
+ < body className = { styles . body } > { children } </ body >
56
55
{ googleAnalyticsId && < GoogleAnalytics gaId = { googleAnalyticsId } /> }
57
56
{ amplitudeApiKey && < Amplitude apiKey = { amplitudeApiKey } /> }
58
57
{ enableAccessibilityReporting && < ReportAccessibility /> }
59
58
</ HtmlWithLang >
60
59
</ RootProviders >
61
60
) ;
62
61
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
+
63
79
type AppBodyProps = Pick <
64
80
ComponentProps < typeof Header > ,
65
81
"appName" | "mainCta" | "extraCta" | "displaySupportButton"
0 commit comments