mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
23 lines
422 B
TypeScript
23 lines
422 B
TypeScript
import React, { Suspense } from 'react'
|
|
import { headers } from 'next/headers'
|
|
import { InsertHtml } from './client'
|
|
|
|
async function Dynamic() {
|
|
await headers()
|
|
|
|
return (
|
|
<div>
|
|
<h3>dynamic</h3>
|
|
<InsertHtml id={'inserted-html'} data={'dynamic-data'} />
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default function Page() {
|
|
return (
|
|
<Suspense fallback={<div>Loading...</div>}>
|
|
<Dynamic />
|
|
</Suspense>
|
|
)
|
|
}
|