mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Reverts the revert of #95878. This failed on `main` due to React bugs (https://github.com/react/react/pull/37061?) which are fixed now.
24 lines
544 B
TypeScript
24 lines
544 B
TypeScript
import Link from 'next/link'
|
|
import { Suspense } from 'react'
|
|
|
|
async function Content(props) {
|
|
const params = await props.params
|
|
return <h1 id="slug-page">Visiting page {params.slug}</h1>
|
|
}
|
|
|
|
export default function Page(props) {
|
|
return (
|
|
<div>
|
|
<Suspense>
|
|
<Content params={props.params} />
|
|
</Suspense>
|
|
<Link href="/blog/a-post" style={{ display: 'block' }} id="to-blog-post">
|
|
Go to a post
|
|
</Link>
|
|
<Link href="/" style={{ display: 'block' }}>
|
|
Go home
|
|
</Link>
|
|
</div>
|
|
)
|
|
}
|