Files
JJ KasperandGitHub 29010ffdf4 Update cases for build complete with adapters (#84361)
This handles `i18n` cases, ensures `pathname` field is prefixed with
`basePath` when configured, and fixes interop with `output: 'export'`
configured.
2025-10-07 14:59:01 -07:00

43 lines
682 B
TypeScript

export function getStaticPaths() {
return {
paths: [
{
params: { slug: 'first' },
},
{
params: { slug: 'second' },
},
{
params: { slug: 'not-found' },
},
],
fallback: 'blocking',
}
}
export function getStaticProps({ params }) {
if (params.slug === 'not-found') {
return {
notFound: true,
}
}
return {
props: {
params,
now: Date.now(),
},
revalidate:
!process.env.TEST_EXPORT && params.slug === 'first' ? 60 : undefined,
}
}
export default function Page() {
return (
<>
<p>/isr-pages/[slug]</p>
<p>now: {Date.now()}</p>
</>
)
}