From 48a50fd47c5a43e6c233afbbd442ade8f9aa75b8 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Sat, 23 Mar 2024 20:06:30 +0100 Subject: [PATCH] added pagination for market list --- src/components/MarketPlace/MainSection.jsx | 16 ++++++++++++---- src/components/MarketPlace/index.jsx | 7 +++++++ src/components/Pagination/NewPaginatedList.jsx | 3 ++- src/middleware/AuthRoute.jsx | 3 ++- src/store/jobLists.js | 2 +- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/components/MarketPlace/MainSection.jsx b/src/components/MarketPlace/MainSection.jsx index 46d74bb..db8dc29 100644 --- a/src/components/MarketPlace/MainSection.jsx +++ b/src/components/MarketPlace/MainSection.jsx @@ -96,7 +96,9 @@ export default function MainSection({ {/* end of contentDisplay toggler */} -
+ + {/* OLD MARKET JOB LISTING */} + {/*
-
- {/* {products?.length && +
*/} + {/* END OF OLD MARKET JOB LISTING */} + + {products?.length ? - } */} + : +
+ No Jobs Found! +
+ } ); diff --git a/src/components/MarketPlace/index.jsx b/src/components/MarketPlace/index.jsx index e29c0ad..c017cf6 100644 --- a/src/components/MarketPlace/index.jsx +++ b/src/components/MarketPlace/index.jsx @@ -3,6 +3,7 @@ import Layout from "../Partials/Layout"; import CommonHead from "../UserHeader/CommonHead"; import MainSection from "./MainSection"; import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb"; +import LoadingSpinner from "../Spinners/LoadingSpinner"; export default function MarketPlace({ commonHeadData }) { let { jobLists } = useSelector((state) => state.jobLists); @@ -25,12 +26,18 @@ export default function MarketPlace({ commonHeadData }) { } /> + {jobLists.loading ? +
+ +
+ : + } ); diff --git a/src/components/Pagination/NewPaginatedList.jsx b/src/components/Pagination/NewPaginatedList.jsx index ec9a057..8a06307 100644 --- a/src/components/Pagination/NewPaginatedList.jsx +++ b/src/components/Pagination/NewPaginatedList.jsx @@ -42,7 +42,7 @@ export default function NewPaginatedList({ filteredData?.slice(currentPage, numberOfSelection + currentPage) ); }, [currentPage, filteredData]); - console.log("newData", newData, filteredData); + return (

{tableTitle}

@@ -89,6 +89,7 @@ export default function NewPaginatedList({ if(index%itemsPerPage == 0 && index >= currentPage && index <= currentPage+itemsPerPage){ return (