This commit is contained in:
hamid zarghami
2025-03-02 12:12:20 +03:30
parent 1ab4f29d65
commit 19b65baefe
17 changed files with 292 additions and 142 deletions
+7 -1
View File
@@ -1,6 +1,6 @@
import { useMutation, useQuery } from "@tanstack/react-query";
import * as api from "../service/ServiceService";
import { BuyServiceType } from "../types/ServiecTypes";
import { BuyServiceType, CreateReviewType } from "../types/ServiecTypes";
export const useGetSuggestedServices = () => {
return useQuery({
@@ -44,3 +44,9 @@ export const useGetMyServices = (search: string) => {
queryFn: () => api.getMyServices(search),
});
};
export const useCreateReview = () => {
return useMutation({
mutationFn: (variables: CreateReviewType) => api.createReview(variables),
});
};