Skip to content

Commit

Permalink
fix type for clearDomainPageFilters
Browse files Browse the repository at this point in the history
  • Loading branch information
Assem-Hafez committed Apr 15, 2024
1 parent a6c4d1b commit da0c2f3
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ function clearDomainPageFilters<P extends PageQueryParams>(
setQueryParams: PageQueryParamSetter<P>,
filters: DomainPageFilters = domainPageFilters
) {
const newValues = Object.fromEntries(filters.map((f) => [f.id, undefined]));
setQueryParams(newValues);
const emptyFiltersKeyValueEntries = filters.map((f) => [f.id, undefined]);
const emptyValuesObj = Object.fromEntries(emptyFiltersKeyValueEntries);
setQueryParams(emptyValuesObj);
}
export default clearDomainPageFilters;

0 comments on commit da0c2f3

Please sign in to comment.