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

export const useGetUsers = (page: number = 1, limit: number = 10) => {
  return useQuery({
    queryKey: ["users", page, limit],
    queryFn: () => api.getUsers(page, limit),
  });
};
