Files
dmenu-admin/src/pages/paymentMethods/hooks/usePaymentMethodData.ts
T
2025-11-23 09:59:37 +03:30

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,
});
};