Hero Top data parts

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-04-25 20:45:25 -04:00
parent b888e9f5df
commit 7f4d8f3ff0
4 changed files with 33 additions and 2 deletions
+17 -1
View File
@@ -1,7 +1,23 @@
import React from "react";
import Home from "../components/Home";
import usersService from "../services/UsersService";
export default function HomePages() {
const [marketActiveJobList, setMarketActiveJobList] = useState([]);
const api = new usersService();
const getMarketActiveJobList = async () => {
try {
const res = await api.getHeroJBanners();
setMarketActiveJobList(res.data);
} catch (error) {
console.log("Error getting mode");
}
};
useEffect(() => {
getMarketActiveJobList();
}, []);
return (
<>
<Home />