pending assign value changed

This commit was merged in pull request #369.
This commit is contained in:
victorAnumudu
2023-08-01 15:42:28 +01:00
parent 711226f913
commit a0c3437eae
4 changed files with 112 additions and 45 deletions
+9 -3
View File
@@ -5,20 +5,26 @@ import { useSelector } from "react-redux";
export default function MyPendingJobsPage() {
let { commonHeadBanner } = useSelector((state) => state.commonHeadBanner);
const [MyJobList, setMyJobList] = useState([]);
let { pendingListTable } = useSelector((state) => state.tableReload);
console.log('TESTING', pendingListTable)
const [MyJobList, setMyJobList] = useState({loading: true, data: []});
const api = new usersService();
const getMyJobList = async () => {
try {
const res = await api.getMyPendingJobList();
setMyJobList(res.data);
setMyJobList({loading: false, data: res.data});
} catch (error) {
setMyJobList({loading: false, data: []});
console.log("Error getting mode");
}
};
useEffect(() => {
getMyJobList();
}, []);
}, [pendingListTable]);
// debugger;
return (