fridays / next-routes

Universal dynamic routes for Next.js
MIT License
2.47k stars 230 forks source link

Params matched encoding #313

Closed DonStanislas closed 1 year ago

DonStanislas commented 5 years ago

Hi,

I have this code:

const routes = require('next-routes');
routes().add({ name: 'brand', pattern: "/search/:brand" });
<Link route="brand" params={{ brand: "alpha+romeo", sort: "mileage+asc" }}>Search</Link>

And my result is this: /search/alpha%2Bromeo?sort:mileage%2Basc

I would like to have this: /search/alpha+Bromeo?sort:mileage%2Basc

I would like the params not to be encoded. Or just the matched params. Can you help me ?

Thank you in advance,