rsnext/test/integration/i18n-support-fallback-rewrite-legacy/pages/index.js
JJ Kasper f02363e0c4
Ensure no-op rewrite matches dynamic route with i18n correctly (#23860)
This ensures we match dynamic routes correctly when applying `check: true` behavior with i18n so that no-op rewrites match dynamic routes correctly. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added

Fixes: https://github.com/vercel/next.js/issues/23854
2021-04-12 09:42:01 +00:00

16 lines
306 B
JavaScript

import { useRouter } from 'next/router'
export default function Index(props) {
const router = useRouter()
return (
<p id="router">
{JSON.stringify({
pathname: router.pathname,
asPath: router.asPath,
query: router.query,
index: true,
})}
</p>
)
}