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

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

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