mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
19 lines
336 B
JavaScript
19 lines
336 B
JavaScript
import { connection } from 'next/server'
|
|
import { Suspense } from 'react'
|
|
|
|
export default async function Page() {
|
|
await connection()
|
|
return (
|
|
<Suspense>
|
|
<Inner />
|
|
</Suspense>
|
|
)
|
|
}
|
|
|
|
function Inner() {
|
|
if (typeof window === 'undefined') {
|
|
throw new Error('server-suspense-page-node-error')
|
|
}
|
|
return 'inner'
|
|
}
|