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

export default function MyPendingJobsPage() {

    const [MyJobList, setMyJobList] = useState([]);
    const api = new usersService();

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

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