mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
We insert the content returning from `useServerInsertedHTML` to head element for app dir, but it shouldn't only inject once since there're suspense boundaries that could hold insertions. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` Co-authored-by: JJ Kasper <[email protected]>
23 lines
443 B
JavaScript
23 lines
443 B
JavaScript
import { Suspense } from 'react'
|
|
import { createDataFetcher } from '../../lib/data'
|
|
import Nav from '../../components/nav'
|
|
|
|
const Data = createDataFetcher('next_streaming_data', {
|
|
timeout: 500,
|
|
})
|
|
|
|
export default function Page() {
|
|
return (
|
|
<div>
|
|
<div id="content">
|
|
<Suspense fallback="next_streaming_fallback">
|
|
<Data />
|
|
</Suspense>
|
|
</div>
|
|
<div>
|
|
<Nav />
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|