Progress Cards for Top Payees

This commit is contained in:
2026-04-25 12:41:05 +05:30
parent 71afc157ff
commit 89ad8e376e
8 changed files with 59 additions and 18 deletions

View File

@@ -16,6 +16,7 @@ export function useResource<T = any>(config: ResourceConfig | undefined) {
queryKey: [name, "list", params],
queryFn: async () => {
if (!endpoint) return { data: [], total: 0 };
console.log('params:', params);
// @ts-ignore
const res = await api.get<T[]>(endpoint, { params });
const total = res.headers ? parseInt(res.headers['x-total-count'] || res.headers['X-Total-Count']) : undefined;