next.js/test/e2e/app-dir/errors/app/server-component/recover/page.js
page.js27 lines455 B
import { Suspense } from 'react'
import { connection } from 'next/server'

export default function Page() {
  return (
    <Suspense>
      <Container>
        <Content />
      </Container>
    </Suspense>
  )
}

function Container({ children }) {
  return <div>{children}</div>
}

async function Content() {
  await connection()

  if (!globalThis.__nextTestRecover) {
    throw new Error('this is a test')
  }

  return <p id="recover">Recovered</p>
}
Quest for Codev2.0.0
/
SIGN IN