Fixed clear all filters button.

This commit is contained in:
Mike Cao 2023-12-13 00:59:19 -08:00
parent 9f73aba900
commit 310cf0b221
1 changed files with 6 additions and 6 deletions

View File

@ -19,11 +19,11 @@ export function FilterTags({ params }) {
}
function handleCloseFilter(param?: string) {
if (!param) {
router.push(makeUrl({ view }, true));
} else {
router.push(makeUrl({ [param]: undefined }));
}
router.push(makeUrl({ [param]: undefined }));
}
function handleResetFilter() {
router.push(makeUrl({ view }, true));
}
return (
@ -44,7 +44,7 @@ export function FilterTags({ params }) {
</div>
);
})}
<Button size="sm" variant="quiet" onClick={handleCloseFilter}>
<Button size="sm" variant="quiet" onClick={handleResetFilter}>
<Icon>
<Icons.Close />
</Icon>