mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This continues https://github.com/vercel/next.js/pull/39707 bringing the changes up to date with canary and adds test cases to ensure it's working as expected. Closes: https://github.com/vercel/next.js/issues/22319 Closes: https://github.com/vercel/next.js/pull/39707 Closes: NDX-148
30 lines
436 B
TypeScript
30 lines
436 B
TypeScript
export function getStaticProps({ params }) {
|
|
return {
|
|
props: {
|
|
now: Date.now(),
|
|
params,
|
|
},
|
|
revalidate: 120,
|
|
}
|
|
}
|
|
|
|
export function getStaticPaths() {
|
|
return {
|
|
paths: [
|
|
{
|
|
params: { slug: 'first' },
|
|
},
|
|
],
|
|
fallback: 'blocking',
|
|
}
|
|
}
|
|
|
|
export default function Page({ params }) {
|
|
return (
|
|
<>
|
|
<p>/pages-ssg/[slug]</p>
|
|
<p>{JSON.stringify(params)}</p>
|
|
</>
|
|
)
|
|
}
|