diff --git a/src/frontend/hooks/use-filter-drawer.tsx b/src/frontend/hooks/use-filter-drawer.tsx index f21214295..dfe38858f 100644 --- a/src/frontend/hooks/use-filter-drawer.tsx +++ b/src/frontend/hooks/use-filter-drawer.tsx @@ -9,18 +9,12 @@ export const useFilterDrawer = () => { const dispatch = useDispatch() const isVisible = useSelector((state: ReduxState) => state.filterDrawer.isVisible) - const { showFilters, filters = {} } = useQueryParams() + const { filters = {} } = useQueryParams() useEffect(() => { setFiltersCount(Object.keys(filters).length) }, [filters]) - useEffect(() => { - if (showFilters) { - dispatch(showFilterDrawer()) - } - }, [showFilters]) - const toggleFilter = () => { dispatch(isVisible ? hideFilterDrawer() : showFilterDrawer()) } diff --git a/src/frontend/hooks/use-query-params.ts b/src/frontend/hooks/use-query-params.ts index 8d78e7c78..e7be93a31 100644 --- a/src/frontend/hooks/use-query-params.ts +++ b/src/frontend/hooks/use-query-params.ts @@ -1,5 +1,4 @@ /* eslint-disable no-unused-vars */ -import isEmpty from 'lodash/isEmpty.js' import pick from 'lodash/pick.js' import { parse, stringify } from 'qs' import { useMemo } from 'react' @@ -45,7 +44,6 @@ export function useQueryParams< [searchParams, pathname], ) const { sortBy, direction, page, tab, filters, redirectUrl } = parsedQuery - const showFilters = !isEmpty(filters) const listParams = useMemo( () => pick(parsedQuery, [ QueryListParams.SortBy, @@ -86,7 +84,6 @@ export function useQueryParams< } return { - showFilters, parsedQuery, listParams, filters: filters as unknown as FiltersT,