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