2020-01-20 22:44:50 +01:00
|
|
|
export async function unstable_getStaticProps({ params: { slug } }) {
|
|
|
|
return {
|
|
|
|
props: {
|
|
|
|
slug,
|
|
|
|
},
|
|
|
|
revalidate: 1,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export async function unstable_getStaticPaths() {
|
2020-02-08 04:09:54 +01:00
|
|
|
return {
|
|
|
|
paths: [
|
|
|
|
{ params: { slug: ['first'] } },
|
|
|
|
'/catchall/second',
|
|
|
|
{ params: { slug: ['another', 'value'] } },
|
|
|
|
'/catchall/hello/another',
|
|
|
|
],
|
|
|
|
}
|
2020-01-20 22:44:50 +01:00
|
|
|
}
|
|
|
|
|
2020-02-07 14:09:06 +01:00
|
|
|
export default ({ slug }) => <p id="catchall">Hi {slug?.join('/')}</p>
|