diff --git a/verification/curator-service/ui/src/components/App/index.tsx b/verification/curator-service/ui/src/components/App/index.tsx index 465fcf8db..44c0e58c4 100644 --- a/verification/curator-service/ui/src/components/App/index.tsx +++ b/verification/curator-service/ui/src/components/App/index.tsx @@ -328,7 +328,6 @@ export default function App(): JSX.Element { const onModalClose = (): void => { const searchQueryObject = new URLSearchParams(searchQuery); - navigate( { pathname: diff --git a/verification/curator-service/ui/src/components/FiltersDialog/index.tsx b/verification/curator-service/ui/src/components/FiltersDialog/index.tsx index c9baf7a8d..2161aa807 100644 --- a/verification/curator-service/ui/src/components/FiltersDialog/index.tsx +++ b/verification/curator-service/ui/src/components/FiltersDialog/index.tsx @@ -153,18 +153,18 @@ export default function FiltersDialog({ handleSetModalAlert(); dispatch(setModalOpen(false)); - let searchQuery = filtersToURL(values); - if (location.search.includes('?q=')) { - const q = new URLSearchParams(location.search).get('q'); - searchQuery = `${searchQuery}&q=${q}` + const searchParams = new URLSearchParams(); + for (const [key, value] of Object.entries(values)) { + if (value) searchParams.set(key, value); } + const searchParamsString = searchParams.toString(); - sendCustomGtmEvent('filters_applied', { query: searchQuery }); + sendCustomGtmEvent('filters_applied', { query: searchParamsString }); navigate({ pathname: '/cases', - search: searchQuery, + search: searchParamsString, }); }, });