removed client data massaging with backend report using feature/report

This commit is contained in:
2026-04-24 14:27:20 +05:30
parent 49bdb85088
commit 1fe44abfde
7 changed files with 244 additions and 345 deletions

View File

@@ -0,0 +1,17 @@
import { useQuery } from "@tanstack/react-query";
import { fetchReport } from "./report.api";
export interface ReportParams {
period: "weekly" | "monthly" | "yearly" | "fyly";
rolling?: boolean;
report_date?: string;
group_by?: ("flow" | "payee" | "tags")[];
ignore_self?: boolean;
}
export function useReport(params: ReportParams) {
return useQuery({
queryKey: ["report", params],
queryFn: () => fetchReport(params),
});
}