mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
23 lines
359 B
JavaScript
23 lines
359 B
JavaScript
import { Suspense } from 'react'
|
|
|
|
function MyError() {
|
|
if (typeof window === 'undefined') {
|
|
throw new Error('oops')
|
|
}
|
|
}
|
|
|
|
export default function page() {
|
|
return (
|
|
<>
|
|
<h1>Hey Error</h1>
|
|
<Suspense fallback="error-fallback">
|
|
<MyError />
|
|
</Suspense>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export const config = {
|
|
runtime: 'experimental-edge',
|
|
}
|