fix job cards
This commit is contained in:
@@ -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} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user