17 lines
367 B
TypeScript
17 lines
367 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
import * as api from "../service/TransactionService";
|
|
|
|
export const useGetMyCoupons = () => {
|
|
return useQuery({
|
|
queryKey: ["my-coupons"],
|
|
queryFn: api.getMyCoupons,
|
|
});
|
|
};
|
|
|
|
export const useGetUserWallet = () => {
|
|
return useQuery({
|
|
queryKey: ["user-wallet"],
|
|
queryFn: api.getUserWallet,
|
|
});
|
|
};
|