30 lines
873 B
React
30 lines
873 B
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 [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={marketActiveJobList} />
|
|
</>
|
|
);
|
|
}
|