From bd32eb02d6e9f2346841bf75da02eb96b10bb6d3 Mon Sep 17 00:00:00 2001 From: asif Date: Thu, 26 Dec 2024 16:28:12 +0530 Subject: [PATCH] added keys in form rows and made noOfLockers integer --- src/pages/LockersRegistration.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/LockersRegistration.jsx b/src/pages/LockersRegistration.jsx index a66c5b8..bf5b8c8 100644 --- a/src/pages/LockersRegistration.jsx +++ b/src/pages/LockersRegistration.jsx @@ -20,7 +20,7 @@ function LockersRegistration() { const noOfLockers = location.state?.noOfLockers; const cabinetId = location.state?.cabinetId; - const initLockers = Array(noOfLockers ? parseInt(noOfLockers) : 0) + const initLockers = Array(noOfLockers) .fill() .map(() => ({ id: "", @@ -163,9 +163,9 @@ function LockersRegistration() { const valid = lockerValues[`${field.name}Valid`]; return field.type === "input" ? ( - + ) : ( - + ); };