File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,18 @@ export const metadata: Metadata = {
5353} ;
5454
5555// This component will be wrapped in Suspense in the BaseLayout
56- async function Providers ( { children } : { children : React . ReactNode } ) {
57- // These async operations will be handled by Suspense in the parent component
56+ function Providers ( { children } : { children : React . ReactNode } ) {
57+ return (
58+ < Suspense fallback = { < ProvidersFallback /> } >
59+ < ProvidersContent >
60+ { children }
61+ </ ProvidersContent >
62+ </ Suspense >
63+ ) ;
64+ }
65+
66+ // This is the async component that fetches config
67+ async function ProvidersContent ( { children } : { children : React . ReactNode } ) {
5868 const config = await getConfig ( ) ;
5969
6070 return (
@@ -87,11 +97,9 @@ export default function BaseLayout({
8797 shadow = "0 0 10px #000, 0 0 5px #000"
8898 height = { 4 }
8999 />
90- < Suspense fallback = { < ProvidersFallback /> } >
91- < Providers >
92- { children }
93- </ Providers >
94- </ Suspense >
100+ < Providers >
101+ { children }
102+ </ Providers >
95103 < Toaster richColors closeButton position = "top-right" expand duration = { 7000 } />
96104 < StartupStudioStickyBanner />
97105 </ body >
You can’t perform that action at this time.
0 commit comments