Job list
This commit is contained in:
@@ -5,27 +5,25 @@ import usersService from "../services/UsersService";
|
||||
|
||||
export default function MyTaskPage() {
|
||||
|
||||
// const userApi = new usersService();
|
||||
// const activeJobList = userApi.getMyJobList();
|
||||
const [ActiveJobList, setActiveJobList] = useState([]);
|
||||
const [MyActiveJobList, setMyActiveJobList] = useState([]);
|
||||
const api = new usersService();
|
||||
|
||||
const getActiveJobList = async () => {
|
||||
const getMyActiveJobList = async () => {
|
||||
try {
|
||||
const res = await api.getActiveJobList();
|
||||
setActiveJobList(res.data);
|
||||
const res = await api.getMyActiveJobList();
|
||||
setMyActiveJobList(res.data);
|
||||
} catch (error) {
|
||||
console.log("Error getting mode");
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
getActiveJobList();
|
||||
getMyActiveJobList();
|
||||
}, []);
|
||||
|
||||
//debugger;
|
||||
return (
|
||||
<>
|
||||
<MyTasks ActiveJobList={ActiveJobList}/>
|
||||
<MyTasks ActiveJobList={MyActiveJobList}/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user