Files
JJ KasperandGitHub 8a1c9937b6 Make sure to break rewrites chain when dynamic route matches (#16455)
This makes sure to also check if a dynamic route matched after resolving a rewrite on the client to match behavior on the server. It also adds tests for this behavior to ensure it is working properly. 

Fixes: https://github.com/vercel/next.js/issues/16454
2020-08-22 05:15:45 +00:00

6 lines
135 B
JavaScript

import { useRouter } from 'next/router'
export default () => (
<p id="category">category: {useRouter().query.slug?.join('/')}</p>
)