export function setURIParams(params: URLSearchParams, remove = false): void {
  const url = new URL(window.location.href);

  params.forEach((value: string, key: string) => {
    if (!remove) {
      url.searchParams.set(key, value);
    } else {
      url.searchParams.delete(key);
    }
  });

  window.history.replaceState(null, '', url);
}
