({ params, keysToRemove }: RemoveUrlQueryParams)
| 72 | } |
| 73 | |
| 74 | export function removeKeysFromQuery({ params, keysToRemove }: RemoveUrlQueryParams) { |
| 75 | const currentUrl = qs.parse(params) |
| 76 | |
| 77 | keysToRemove.forEach(key => { |
| 78 | delete currentUrl[key] |
| 79 | }) |
| 80 | |
| 81 | return qs.stringifyUrl( |
| 82 | { |
| 83 | url: window.location.pathname, |
| 84 | query: currentUrl, |
| 85 | }, |
| 86 | { skipNull: true } |
| 87 | ) |
| 88 | } |
| 89 | |
| 90 | export const handleError = (error: unknown) => { |
| 91 | console.error(error) |
no outgoing calls
no test coverage detected