This commit is contained in:
hamid zarghami
2026-02-17 11:12:25 +03:30
parent d3f65e90ea
commit a939d3bb4c
8 changed files with 116 additions and 9 deletions
+8 -1
View File
@@ -1,4 +1,4 @@
import { useMutation } from "@tanstack/react-query";
import { useMutation, useQuery } from "@tanstack/react-query";
import * as api from "../service/Service";
export const useCreateBill = () => {
@@ -12,3 +12,10 @@ export const useCreateCharge = () => {
mutationFn: api.createChargeBill,
});
};
export const useGetBills = (page: number = 1) => {
return useQuery({
queryKey: ["bills", page],
queryFn: () => api.getBills(page),
});
};