Quest for Codev2.0.0
/
SIGN IN
next.js/test/e2e/app-dir/instant-validation-build/app/(default)/headers/valid-headers-passed-to-client/page.tsx
page.tsx25 lines583 B
import type { Instant } from 'next'
import { headers } from 'next/headers'
import { ClientChild } from './client'

export const unstable_instant: Instant = {
  samples: [
    {
      headers: [['x-test-header', 'testValue']],
    },
  ],
}
export const unstable_prefetch = 'force-runtime'

export default async function Page() {
  return (
    <main>
      <p>
        Passing the whole headers object to the client is generally a bad idea,
        but it shouldn't crash validation, so we still do it
      </p>
      <ClientChild headerStore={await headers()} />
    </main>
  )
}