feat(dashboard): reuse reports filter on overview and add more operators (#31)
This commit is contained in:
11
apps/dashboard/src/hooks/usePropertyValues.ts
Normal file
11
apps/dashboard/src/hooks/usePropertyValues.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { api } from '@/trpc/client';
|
||||
|
||||
export function usePropertyValues(
|
||||
params: Parameters<typeof api.chart.values.useQuery>[0]
|
||||
) {
|
||||
const query = api.chart.values.useQuery(params, {
|
||||
staleTime: 1000 * 60 * 10,
|
||||
});
|
||||
|
||||
return query.data?.values ?? [];
|
||||
}
|
||||
Reference in New Issue
Block a user