mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
21 lines
442 B
TypeScript
21 lines
442 B
TypeScript
import { Suspense } from 'react'
|
|
import { connection } from 'next/server'
|
|
|
|
async function SlugContent({ params }: { params: Promise<{ slug: string }> }) {
|
|
await connection()
|
|
const { slug } = await params
|
|
return <p>slug: {slug}</p>
|
|
}
|
|
|
|
export default function Page({
|
|
params,
|
|
}: {
|
|
params: Promise<{ slug: string }>
|
|
}) {
|
|
return (
|
|
<Suspense fallback={<p>loading...</p>}>
|
|
<SlugContent params={params} />
|
|
</Suspense>
|
|
)
|
|
}
|