http://localhost:3000/?search=test&type=abc&category=xyz
After I search for test (among with type and category), the URL changes to the URL above.
return router.push(
{
pathname: `/`,
query: {
// something to do here...
},
},
"",
{ scroll: false }
);
Next, I have an onClick with this router.push.
I would like to remove ONLY the search query and keep the type and category queries. How is it possible? The documentation doesn't mention anything about this.