import React, { useContext,useState, useEffect } from "react";
import usersService from "../services/UsersService";
import FamilyAcc from "../components/FamilyAcc";

export default function FamilyAccPage() {

    const [MyActiveJobList, setMyActiveJobList] = useState([]);
    const api = new usersService();

    const getMyActiveJobList = async () => {
        try {
            const res = await api.getMyActiveJobList();
            setMyActiveJobList(res.data);
        } catch (error) {
            console.log("Error getting mode");
        }
    };
    useEffect(() => {
        getMyActiveJobList();
    }, []);

    //debugger;
    return (
        <>
            <FamilyAcc ActiveJobList={MyActiveJobList}/>
        </>
    );
}
