feat: clear all filters

This commit is contained in:
Henry
2024-09-27 15:42:02 +01:00
parent 50b08e2e85
commit 5306bb310d
3 changed files with 41 additions and 9 deletions

8
src/utils/helpers.ts Normal file
View File

@@ -0,0 +1,8 @@
export const formatToArray = (
value: string | string[] | undefined,
): string[] => {
if (Array.isArray(value)) {
return value.filter((item) => item !== undefined);
}
return value ? [value] : [];
};