I want to add data in url params after clicking on a button in next.js
function send() {
router.push(
{ pathname: "/", query: { n: "firstparam,secondparam" } },
undefined,
{
shallow: true
}
);
}
After clicnking, i get in the url:
site/?n=firstparam%2Csecondparam
So, nextjs instead of the ,, adds %2C. How to avoid all these signs and to get a valid url without using replace()?like:site/?n=firstparam,secondparam
demo: https://codesandbox.io/s/vibrant-sinoussi-d9z77?file=/pages/index.js