17 lines
427 B
TypeScript
17 lines
427 B
TypeScript
import * as api from "../service/PaymentMethodService";
|
|
import { useQuery } from "@tanstack/react-query";
|
|
|
|
export const useGetPaymentMethods = () => {
|
|
return useQuery({
|
|
queryKey: ["payment-methods"],
|
|
queryFn: api.getPaymentMethods,
|
|
});
|
|
};
|
|
|
|
export const useGetRestaurantPaymentMethods = () => {
|
|
return useQuery({
|
|
queryKey: ["restaurant-payment-methods"],
|
|
queryFn: api.getRestaurantPaymentMethods,
|
|
});
|
|
};
|