import { useQuery } from "@tanstack/react-query";
import * as api from "../service/Service";
import { FeedbackResponse } from "../types/FeedbackTypes";

export const useGetFeedbacks = (page: number) => {
  return useQuery<FeedbackResponse>({
    queryKey: ["feedbacks", page],
    queryFn: () => api.getFeedbacks(page),
  });
};
