This commit is contained in:
hamid zarghami
2025-12-29 14:32:07 +03:30
parent 782ceae3e5
commit fe07425d7e
7 changed files with 327 additions and 151 deletions
+8 -1
View File
@@ -1,6 +1,6 @@
import { useMutation, useQuery } from "@tanstack/react-query";
import * as api from "../service/IconService";
import { GroupIconsResponse } from "../types/Types";
import { GroupIconsResponse, ReportsResponse } from "../types/Types";
export const useGetIcons = () => {
return useQuery({
@@ -39,3 +39,10 @@ export const useDeleteIcon = () => {
mutationFn: (id: string) => api.deleteIcon(id),
});
};
export const useGetReports = () => {
return useQuery<ReportsResponse>({
queryKey: ["reports"],
queryFn: api.getReports,
});
};