How to remove Query Params
You can use next/router to remove the query params in the URL. const router = useRouter(); router.replace(‘/about’, undefined, { shallow: true }); Use replace to prevent adding a new URL entry into the history (otherwise just use push), and shallow: true allows you to change the URL without running data fetching methods. This will cause … Read more