feat: use search params for filters instead of redux

This commit is contained in:
2024-01-01 15:17:05 +01:00
parent dd9cc3e3aa
commit a56ca779fc
29 changed files with 247 additions and 110 deletions

View File

@@ -0,0 +1,9 @@
type Valuable<T> = { [K in keyof T as T[K] extends null | undefined ? never : K]: T[K] }
export function getValuable<T extends {}, V = Valuable<T>>(obj: T): V {
return Object.fromEntries(
Object.entries(obj).filter(
([, v]) => !((typeof v === 'string' && !v.length) || v === null || typeof v === 'undefined')
)
) as V
}