support plan

This commit is contained in:
hamid zarghami
2025-05-05 16:59:48 +03:30
parent b945ffb0a3
commit f45273fc96
25 changed files with 552 additions and 9 deletions
+12
View File
@@ -0,0 +1,12 @@
import { useQuery, useMutation } from "@tanstack/react-query";
import { getSupportPlans, buySupportPlan } from "../service/SupportService";
export const useGetSupportPlans = () => {
return useQuery({ queryKey: ["support-plans"], queryFn: getSupportPlans });
};
export const useBuySupportPlan = () => {
return useMutation({
mutationFn: (planId: string) => buySupportPlan(planId),
});
};