rsnext/test/integration/prerender-invalid-catchall-params/pages/[...slug].js
JJ Kasper 5f5c5e4e9e Add support for catch-all routes with SSG (#10175)
* Add support for catchall routes with SSG

* Add test for invalid catchall param in getStaticPaths
2020-01-20 16:44:50 -05:00

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 />
}