import { GetLatestAPI } from "@/type/wwwAPI";

import { wwwAPI } from "@/utilities/wwwAPI";
import { useQuery } from "@tanstack/react-query";

export default function useGetLatestEnrolledAvatar() {
  return useQuery({
    queryKey: ["latestEnrolledAvatar"],
    queryFn: async () => {
      const { data } = await wwwAPI.get<GetLatestAPI>("/avatar/latestEnrolled");
      return data;
    },
    initialData: [],
  });
}
