contact
This commit is contained in:
@@ -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,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user