import { useQuery } from "@tanstack/react-query";
import { getOrders } from "../service/Service";

export const useGetOrders = (status: "old" | "current") => {
  return useQuery({
    queryKey: ["orders", status],
    queryFn: () => getOrders(status),
  });
};
