This commit is contained in:
CHIEFSOFT\ameye
2023-05-06 14:29:11 -04:00
parent 27609bd5af
commit fd13b1f527
4 changed files with 33 additions and 25 deletions
+6 -8
View File
@@ -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}/>
</>
);
}