mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
15 lines
362 B
JavaScript
15 lines
362 B
JavaScript
import { cookies, headers } from 'next/headers'
|
|
|
|
export default async function Layout({ children }) {
|
|
const curHeaders = await headers()
|
|
const curCookies = await cookies()
|
|
|
|
return (
|
|
<>
|
|
<p id="headers">{JSON.stringify([...curHeaders.keys()])}</p>
|
|
<p id="cookies">{JSON.stringify([...curCookies.getAll()])}</p>
|
|
{children}
|
|
</>
|
|
)
|
|
}
|