From a65243f45d81f0f8490cb3460bcfcdc05438b8a3 Mon Sep 17 00:00:00 2001 From: pramod mahajan Date: Wed, 16 Jul 2025 17:44:35 +0530 Subject: [PATCH] Fiixedd: Regularization pagination not reflecting current page data --- src/components/Activities/Regularization.jsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/components/Activities/Regularization.jsx b/src/components/Activities/Regularization.jsx index a192f51b..03f75e32 100644 --- a/src/components/Activities/Regularization.jsx +++ b/src/components/Activities/Regularization.jsx @@ -8,6 +8,7 @@ import moment from "moment"; import usePagination from "../../hooks/usePagination"; import eventBus from "../../services/eventBus"; import { cacheData, clearCacheKey } from "../../slices/apiDataManager"; +import { ITEMS_PER_PAGE } from "../../utils/constants"; const Regularization = ({ handleRequest }) => { var selectedProject = useSelector((store) => store.localVariables.projectId); @@ -44,7 +45,7 @@ const Regularization = ({ handleRequest }) => { const { currentPage, totalPages, currentItems, paginate } = usePagination( filteredData, - 20 + ITEMS_PER_PAGE ); useEffect(() => { eventBus.on("regularization", handler); @@ -85,15 +86,10 @@ const Regularization = ({ handleRequest }) => { - {/* {loading && ( - - Loading... - - )} */} {!loading && - (regularizes?.length > 0 ? ( - regularizes?.map((att, index) => ( + (currentItems?.length > 0 ? ( + currentItems?.map((att, index) => (
@@ -118,7 +114,6 @@ const Regularization = ({ handleRequest }) => { : "--"} - {/*
*/}