import * as api from "../service/TransactionService";
import { useQuery } from "@tanstack/react-query";

export const useGetTransactions = (
  page: number,
  userSearch: string,
  dateSearch: string,
  search: string
) => {
  return useQuery({
    queryKey: ["transactions", page, userSearch, dateSearch, search],
    queryFn: () => api.getTransactions(page, userSearch, dateSearch, search),
  });
};
