mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
19 lines
428 B
JavaScript
19 lines
428 B
JavaScript
export default async function Layout(props) {
|
|
const params = await props.params
|
|
|
|
const { children } = props
|
|
|
|
return (
|
|
<>
|
|
<p id="author-layout-params">{JSON.stringify(params)}</p>
|
|
{children}
|
|
</>
|
|
)
|
|
}
|
|
|
|
export function generateStaticParams({ params }) {
|
|
console.log('/blog/[author] generateStaticParams', JSON.stringify(params))
|
|
|
|
return [{ author: 'tim' }, { author: 'seb' }, { author: 'styfle' }]
|
|
}
|