mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
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
14 lines
310 B
JavaScript
14 lines
310 B
JavaScript
import { useRouter } from 'next/router'
|
|
|
|
export default function Page() {
|
|
const router = useRouter()
|
|
return (
|
|
<>
|
|
<p>/_sport/[slug]/test</p>
|
|
<p id="query">{JSON.stringify(router.query)}</p>
|
|
<p id="as-path">{router.asPath}</p>
|
|
<p id="pathname">{router.pathname}</p>
|
|
</>
|
|
)
|
|
}
|