Buckets:
silverwolf-x/project / test /integration /dynamic-optional-routing /pages /nested /[[...optionalName]].js
| import { useRouter } from 'next/router' | |
| export async function getServerSideProps({ query }) { | |
| return { | |
| props: { | |
| query, | |
| }, | |
| } | |
| } | |
| export default function Page(props) { | |
| return ( | |
| <> | |
| <div id="route"> | |
| nested route param:{' '} | |
| {props.query.optionalName === undefined | |
| ? 'undefined' | |
| : `[${props.query.optionalName.join('|')}]`} | |
| </div> | |
| <div id="keys">{JSON.stringify(Object.keys(props.query))}</div> | |
| <div id="asPath">{useRouter().asPath}</div> | |
| </> | |
| ) | |
| } | |
Xet Storage Details
- Size:
- 532 Bytes
- Xet hash:
- 84b7390d096c9199d618dbc361ffdfdf0a1905dea5567dfa367f3b40e827787c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.