feat(frontend): add 6 query/mutation hooks (batches, claims, remits, providers, activity, parse)

This commit is contained in:
Tyler
2026-06-19 19:41:42 -06:00
parent 3ddf962da2
commit d7bd061ee0
6 changed files with 230 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
import { useQuery } from "@tanstack/react-query";
import { api, type BatchSummary } from "@/lib/api";
/**
* Lists parsed batches. Batches are only available when a backend is
* configured — when running in sample-data mode there's no persisted
* history, so we leave the query disabled.
*/
export function useBatches(limit?: number) {
return useQuery<BatchSummary[]>({
queryKey: ["batches", limit ?? null],
queryFn: () => api.listBatches(limit),
enabled: api.isConfigured,
});
}