mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This expands test suite for deferred entries experimental handling and fixes missing handling for metadata routes and route handlers when building the non-deferred entries.
23 lines
471 B
TypeScript
23 lines
471 B
TypeScript
type StaticPathPageProps = {
|
|
slug: string
|
|
}
|
|
|
|
export function getStaticPaths() {
|
|
return {
|
|
paths: [{ params: { slug: 'alpha' } }, { params: { slug: 'beta' } }],
|
|
fallback: false,
|
|
}
|
|
}
|
|
|
|
export function getStaticProps({ params }: { params: { slug: string } }) {
|
|
return {
|
|
props: {
|
|
slug: params.slug,
|
|
},
|
|
}
|
|
}
|
|
|
|
export default function StaticPathPage({ slug }: StaticPathPageProps) {
|
|
return <h1>Pages getStaticPaths + getStaticProps: {slug}</h1>
|
|
}
|