rsnext/test/integration/export/pages/blog/[post]/comment/[id].js
Lukáš Huvar 2450c85e81 exportPathMap dynamic routes params fix (#7846)
* Fix dynamic page export fixes #7829

* Adding handling of unmatched path

* Remove logs

* Fix newline

* Tests

* Fix promise

* Fix amp tests

* Revert test

* Adjust error document

* Remove old argument

* Simplify export test

* Ensure page !== path for this check
2019-07-10 17:13:44 -04:00

18 lines
292 B
JavaScript

import { useRouter } from 'next/router'
const Page = () => {
const router = useRouter()
const { post, id } = router.query
return (
<>
<p>
{`Blog post ${post} comment ${id || '(all)'}`}
</p>
</>
)
}
Page.getInitialProps = () => ({})
export default Page