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

export const unstable_instant: Instant = {
  samples: [
    {
      cookies: [{ name: 'testCookie', value: 'testValue' }],
    },
  ],
}
export const unstable_prefetch = 'force-runtime'

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