mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### Tests * keep node & edge for streaming * separate rsc tests from streaming tests * move rsc tests to app-dir, disable the broken ones for now
25 lines
434 B
JavaScript
25 lines
434 B
JavaScript
import { Suspense } from 'react'
|
|
|
|
let result
|
|
let promise
|
|
function Data() {
|
|
if (result) return result
|
|
if (!promise)
|
|
promise = new Promise((res) => {
|
|
setTimeout(() => {
|
|
result = 'next_streaming_data'
|
|
res()
|
|
}, 500)
|
|
})
|
|
throw promise
|
|
}
|
|
|
|
export default function Page404() {
|
|
return (
|
|
<Suspense fallback={null}>
|
|
<span id="text">custom-404-page</span>
|
|
<Data />
|
|
</Suspense>
|
|
)
|
|
}
|