Files
Jude GaoandGitHub cc5e9e6700 Fix: Allow dynamic rendering when root layout is wrapped in Suspense (#82378)
The prelude is empty when the entire app is suspended during prerender.
Typically this indicates a lack of suspense boundary in the app, which
creates no static shell, thus throwing error. However, if the root
layout itself is dynamic but wrapped under a suspense, we need special
logic in this PR to detect that.
2025-08-12 00:18:40 +00:00

11 lines
188 B
TypeScript

import { headers } from 'next/headers'
export default async function DynamicWrapper({
children,
}: {
children: React.ReactNode
}) {
await headers()
return <div>{children}</div>
}