import useAxios from "axios-hooks";

const useAccount = () => {
  // current plan
  const [{ ...userPlanData }, getUserPlan] = useAxios(
    {
      url: `/payment/v1/current_plan/`,
      method: "GET",
    },

    {
      manual: true,
    }
  );

  const handleGetUserPlan = async () => {
    try {
      await getUserPlan();
    } catch (err) {
      //console.log(err);
    }
  };

  return {
    userPlanData,
    handleGetUserPlan,
  };
};
export default useAccount;
