online payment

This commit is contained in:
hamid zarghami
2025-02-05 11:10:17 +03:30
parent f4263283dc
commit 31daaf6172
8 changed files with 120 additions and 67 deletions
+16
View File
@@ -0,0 +1,16 @@
import { useMutation, useQuery } from "@tanstack/react-query";
import * as api from "../service/WalletService";
import { PaymentType } from "../types/WalletTypes";
export const useGetGetWays = () => {
return useQuery({
queryKey: ["getGetWays"],
queryFn: api.getGetWays,
});
};
export const usePayment = () => {
return useMutation({
mutationFn: (variables: PaymentType) => api.payment(variables),
});
};