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

export default function MyJobsPage() {

    // const userApi = new usersService();
    // const activeJobList  = userApi.getMyJobList();
    const [MyJobList, setMyJobList] = useState([]);
    const api = new usersService();

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

   // debugger;
    return (
        <>
            <MyJobs MyJobList={MyJobList} />
        </>
    );
}
