import React from 'react' import * as next from 'next/headers' export const Dynamic = async ({ pathname, fallback = null, params = null }) => { if (fallback) { return
Dynamic Loading...
} const headers = await next.headers() const messages = [] for (const name of ['x-test-input', 'user-agent']) { messages.push({ name, value: headers.get(name) }) } return (
{pathname && ( <>
Pathname
{pathname}
)} {messages.map(({ name, value }) => (
Header: {name}
{value ?? `MISSING:${name.toUpperCase()}`}
))} {params && ( <>
Params
{JSON.stringify(params)}
)}
) }