mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
27 lines
468 B
JavaScript
27 lines
468 B
JavaScript
import { connection } from 'next/server'
|
|
import { Suspense } from 'react'
|
|
|
|
async function ForceDynamic({ children }) {
|
|
await connection()
|
|
return children
|
|
}
|
|
|
|
export default function Layout({ children }) {
|
|
return (
|
|
<Suspense
|
|
fallback={
|
|
<html>
|
|
<body />
|
|
</html>
|
|
}
|
|
>
|
|
<ForceDynamic>
|
|
<html>
|
|
<head></head>
|
|
<body>{children}</body>
|
|
</html>
|
|
</ForceDynamic>
|
|
</Suspense>
|
|
)
|
|
}
|