This commit is contained in:
hamid zarghami
2025-03-03 15:29:50 +03:30
parent 37081ae981
commit dcf786330c
8 changed files with 53 additions and 15 deletions
+3 -3
View File
@@ -2,10 +2,10 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import * as api from "../service/TicketServiec";
import { AddMessageTicketType, CreateCategoryType } from "../types/TicketTypes";
export const useGetTickets = (status: string) => {
export const useGetTickets = (status: string, customerId?: string) => {
return useQuery({
queryKey: ["tickets", status],
queryFn: () => api.getTickets(status),
queryKey: ["tickets", status, customerId],
queryFn: () => api.getTickets(status, customerId),
});
};