Files
JJ KasperandGitHub 8f09bc44f7 Fix middleware catch-all rewrite case (#63254)
This ensures we properly set the matched header when applying a
middleware skip optimization so that the client router has enough
context to finish resolving the dynamic route params.

Fixes: https://github.com/vercel/next.js/issues/59561

Closes NEXT-2803
2024-03-13 14:14:04 -07:00

15 lines
287 B
JavaScript

import Link from 'next/link'
import { useRouter } from 'next/router'
export default function Detail() {
const router = useRouter()
return (
<div style={{ textAlign: 'center' }}>
<Link href="/">Home</Link>
<pre>{JSON.stringify(router.query)}</pre>
</div>
)
}