parent
0983e5f44d
commit
75f89c4c12
2 changed files with 7 additions and 9 deletions
|
|
@ -1,9 +1,8 @@
|
|||
import { ReadonlyURLSearchParams } from "next/navigation";
|
||||
|
||||
export const generateQueryParams = (searchParams: ReadonlyURLSearchParams, excludedParamKeys?: string[]): string => {
|
||||
export const generateQueryParams = (searchParams: URLSearchParams, excludedParamKeys?: string[]): string => {
|
||||
const params = new URLSearchParams(searchParams);
|
||||
excludedParamKeys && excludedParamKeys.forEach((key) => {
|
||||
params.delete(key);
|
||||
});
|
||||
excludedParamKeys &&
|
||||
excludedParamKeys.forEach((key) => {
|
||||
params.delete(key);
|
||||
});
|
||||
return params.toString();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue