diff --git a/src/components/Home/index.jsx b/src/components/Home/index.jsx index 7228d42..9d38a75 100644 --- a/src/components/Home/index.jsx +++ b/src/components/Home/index.jsx @@ -9,87 +9,12 @@ import LoadingSpinner from '../../components/Spinners/LoadingSpinner' export default function Home(props) { // console.log("PROPS IN HOME->", props); - const userApi = new usersService(); + // const userApi = new usersService(); const { commonHeadBanner } = useSelector((state) => state.commonHeadBanner); - const { userDetails } = useSelector((state) => state?.userDetails); - // const [MyActiveJobList, setMyActiveJobList] = useState({loading:true, data:[]}); // STATE TO HOLD ACTIVE/CURRENT TASKS - - // const getMyActiveJobList = async () => { // FUNCTION TO POPULATE ACTIVE/CURRENT TASK LIST - // try { - // const res = await userApi.getMyActiveTaskList(); - // setMyActiveJobList({loading:false, data:res?.data?.result_list}); - // // setMyActiveJobList(res?.data?.result_list); - // } catch (error) { - // setMyActiveJobList({loading:false, data:[]}); - // // setMyActiveJobList([]); - // console.log("Error getting tasks"); - // } - // }; - - // FUNCTION TO GET DASH DATA TO DETERMINE CURRENT TASK DUE TIME - // const getHomeDate = () => { - // userApi - // .getHomeDate() - // .then((res) => { - // if (res.status != 200 || res.internal_return < 0) { - // return; - // } - // setNextDueTask(res.data); - // }) - // .catch((error) => { - // console.log(error); - // }); - // }; - - // const getMyOffersList = async () => { - // try { - // const res = await userApi.getOffersList(); - // setMyOffersList({loading:false, data:res.data}); - // } catch (error) { - // setMyOffersList({loading:false, data:[]}); - // console.log("Error getting offers", error); - // } - // }; - - // useEffect(() => { - // if(userDetails?.account_type == 'FULL'){ - // getMyActiveJobList(); - // } - // }, []); - return ( - {/* {Object.keys(commonHeadBanner).length < 1 ? - - : -
- {userDetails && userDetails?.account_type == "FAMILY" ? ( - - ) : userDetails && userDetails?.account_type == "FULL" ? ( - - ) : ( -
- You are not logged in or your account type is not supported. -
- )} -
- } */} -
{userDetails && userDetails?.account_type == "FAMILY" ? ( state.commonHeadBanner); - const [bannerOptions, setBannerOptions] = useState({}) - - useEffect(()=>{ const bannerOptions = { bannerList: commonHeadBanner?.result_list,