From b963f6bad94d1d51950fe789411a911c98ccc9eb Mon Sep 17 00:00:00 2001 From: Vikas Nale Date: Thu, 17 Apr 2025 17:52:09 +0530 Subject: [PATCH] Fix loading error. Hide existing content and then show loading --- src/components/Activities/Regularization.jsx | 78 ++++++++++---------- 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/src/components/Activities/Regularization.jsx b/src/components/Activities/Regularization.jsx index 19c2b6b9..0c76cd06 100644 --- a/src/components/Activities/Regularization.jsx +++ b/src/components/Activities/Regularization.jsx @@ -34,45 +34,49 @@ const Regularization = ({ handleRequest }) => { {loading && Loading...} - {regularizes?.length > 0 ? ( - regularizes?.map((att, index) => ( - - -
- -
- - - {att.firstName} {att.lastName} - - + + {!loading && + (regularizes?.length > 0 ? ( + regularizes?.map((att, index) => ( + + +
+ +
+ + + {att.firstName} {att.lastName} + + +
-
- - {moment(att.checkOutTime).format("DD-MMM-YYYY")} - {convertShortTime(att.checkInTime)} - - {att.checkOutTime ? convertShortTime(att.checkOutTime) : "--"} - - - {/*
*/} - - {/*
*/} - + + {moment(att.checkOutTime).format("DD-MMM-YYYY")} + {convertShortTime(att.checkInTime)} + + {att.checkOutTime + ? convertShortTime(att.checkOutTime) + : "--"} + + + {/*
*/} + + {/*
*/} + + + )) + ) : ( + + No Record Found - )) - ) : ( - - No Record Found - - )} + ))}