Closed brad-decker closed 1 year ago
+1
Was looking into a similar case for nextjs before (comma separated querystring values getting uri encoded).
I believe the encoding and url formatting is done by a dependecy of nextjs: https://www.npmjs.com/package/url
Anyways I decided to just use _
as separator for now. Here you can see what character are not encoded by encodeURIComponent
@HeyHugo https://github.com/fridays/next-routes/blob/master/src/index.js#L172 is where the encoding is happening, i think. Do you feel differently?
Ah you're right. I didn't check so carefully and assumed it was using the Router.push / Router.replace of nextjs which I found was using the url package.
@brad-decker Did you ever find a solution for this? I am in the same situation and can't seem to find a graceful way around the encoding.
+1
https://www.redfin.com/city/30818/TX/Austin/filter/min-price=100k,max-price=325k
I am building something that updates the state of the url based on a set of filters, Redfin's site is almost an exact match to my intended effect. The last 'route' portion is the /filter/ and everything after that are a series of filters that we are parsing and can be in any combination or order
Do you have a suggestion for how I can achieve this with next-routes? We are already using it but the problem is everything after filter/ gets urlencoded which produces some very ugly urls.