fix job cards

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-03-18 22:59:21 -04:00
parent 0c32419a52
commit 8493c1bb63
6 changed files with 68 additions and 143 deletions
+20 -5
View File
@@ -1,14 +1,29 @@
import React from "react";
import React, {useState, useEffect} from 'react'
import MarketPlace from "../components/MarketPlace";
import usersService from "../services/UsersService";
export default function MarketPlacePage() {
const userApi = new usersService();
const activeJobList = userApi.getActiveJobList();
console.log("activeJobList->",activeJobList);
// const userApi = new usersService();
// const activeJobList = userApi.getActiveJobList();
// console.log("activeJobList->",activeJobList);
const [marketActiveJobList, setMarketActiveJobList] = useState([]);
const api = new usersService();
const getMarketActiveJobList = async () => {
try {
const res = await api.getActiveJobList();
setMarketActiveJobList(res.data);
} catch (error) {
console.log("Error getting mode");
}
};
useEffect(() => {
getMarketActiveJobList();
}, []);
return (
<>
<MarketPlace activeJobList={activeJobList} />
<MarketPlace activeJobList={marketActiveJobList} />
</>
);
}