import { useDataContext } from "../../common/contexts/data_context";
import { useGet } from "../../common/hooks/useGet";
import { ActivityInfoEntity } from "../domain/entities/activity_info_entity";


export const useGetActivityInfo = (activityId: number) => {
    const { statesRepository } = useDataContext();
    const callback = async () =>{
        return await statesRepository!.getActivityInfo(activityId);
    }
    const { data, requestStatus } = useGet<ActivityInfoEntity | undefined>(callback);
    return { activityInfo: data, requestStatus };
}