import useAxios from "axios-hooks";

const useFriends = () => {
  //GET List Friends

  const [{ ...listFriendsData }, listFriends] = useAxios(
    {
      method: "GET",
    },
    {
      manual: true,
    }
  );
  const handleListFriends = async () => {
    try {
      await listFriends({
        url: `/notify/v1/friends/`,
      });
    } catch (err) {
      //console.log(err);
    }
  };

  return {
    listFriendsData,
    handleListFriends,
  };
};

export default useFriends;
