5f5c5e4e9e
* Add support for catchall routes with SSG * Add test for invalid catchall param in getStaticPaths
20 lines
422 B
JavaScript
20 lines
422 B
JavaScript
import React from 'react'
|
|
|
|
// eslint-disable-next-line camelcase
|
|
export async function unstable_getStaticPaths() {
|
|
return [{ params: { slug: 'hello' } }]
|
|
}
|
|
|
|
// eslint-disable-next-line camelcase
|
|
export async function unstable_getStaticProps({ params }) {
|
|
return {
|
|
props: {
|
|
post: params.post,
|
|
time: (await import('perf_hooks')).performance.now(),
|
|
},
|
|
}
|
|
}
|
|
|
|
export default () => {
|
|
return <div />
|
|
}
|