From cf5107f7c89259fed1aa84391ad13fa279d43d61 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Sat, 25 Jan 2025 15:49:21 +0530 Subject: [PATCH] feat: use input index instead of selector as label --- src/components/robot/RobotEdit.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/robot/RobotEdit.tsx b/src/components/robot/RobotEdit.tsx index 45397ff8..1c070d45 100644 --- a/src/components/robot/RobotEdit.tsx +++ b/src/components/robot/RobotEdit.tsx @@ -313,7 +313,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin {headerText} - {selectors.map((selector) => { + {selectors.map((selector, index) => { const isVisible = showPasswords[selector]; return ( @@ -321,7 +321,7 @@ export const RobotEditModal = ({ isOpen, handleStart, handleClose, initialSettin key={selector} // The type changes based on visibility state type={isVisible ? 'text' : 'password'} - label={`Credential for ${selector}`} + label={`Input ${index + 1}`} value={credentials[selector]?.value || ''} onChange={(e) => handleCredentialChange(selector, e.target.value)} style={{ marginBottom: '20px' }}