mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This makes sure to strip the trailing slash before attempting to resolve the `href` against pages/dynamic routes and adds tests ensuring the correct pages are resolved with `trailingSlash: true` enabled. Fixes: https://github.com/vercel/next.js/issues/16872
12 lines
205 B
JavaScript
12 lines
205 B
JavaScript
import { useRouter } from 'next/router'
|
|
|
|
export default function Page() {
|
|
const router = useRouter()
|
|
|
|
return (
|
|
<>
|
|
<p id="slug">catch-all slug {router.query.slug?.join('/')}</p>
|
|
</>
|
|
)
|
|
}
|