Files
JJ KasperandGitHub 6da71321df Ensure beforeFiles client-side resolving handles dynamic routes (#36317)
This fixes resolving `beforeFiles` rewrites with `next/link` as previously we weren't resolving the destination to a dynamic route since the resolving was being marked as finished when it shouldn't be during `beforeFiles`. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

Fixes: https://github.com/vercel/next.js/issues/35402
2022-04-21 14:58:43 +00:00

14 lines
305 B
JavaScript

import { useRouter } from 'next/router'
export default function Page() {
const router = useRouter()
return (
<>
<p>/_sport/[slug]</p>
<p id="query">{JSON.stringify(router.query)}</p>
<p id="as-path">{router.asPath}</p>
<p id="pathname">{router.pathname}</p>
</>
)
}