rsnext/test/integration/i18n-support-base-path/pages/[post]/index.js
JJ Kasper 5b89b1b6df
Ensure href resolvedAs is correct with locale (#20080)
This makes sure the `locale` doesn't cause the wrong `href` to be resolved, this also ensures route specificity is correct when loading dynamic routes in production mode. 

Fixes: https://github.com/vercel/next.js/issues/19747
2020-12-12 14:06:46 +00:00

12 lines
235 B
JavaScript

import { useRouter } from 'next/router'
export default function Post() {
const router = useRouter()
return (
<>
<p id="post">post: {router.query.post}</p>
<p id="router">{JSON.stringify(router)}</p>
</>
)
}