From 7f8bd75c99162e21542bed224c13d3e0655bf0d9 Mon Sep 17 00:00:00 2001 From: Urvish Date: Wed, 11 Nov 2026 15:45:34 +0530 Subject: [PATCH] fix(auth): add visibility toggle to confirm password and update mismatch error message --- src/App.tsx | 2 +- src/components/auth/ProfileDrawer.tsx | 26 ++++++++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 9dfc89b..13fe2c5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -500,7 +500,7 @@ export default function App() { return; } if (changeNewPassword !== changeConfirmPassword) { - setChangePasswordError('New passwords do not match.'); + setChangePasswordError('Confirm password do not match.'); return; } diff --git a/src/components/auth/ProfileDrawer.tsx b/src/components/auth/ProfileDrawer.tsx index f852025..cc5217c 100644 --- a/src/components/auth/ProfileDrawer.tsx +++ b/src/components/auth/ProfileDrawer.tsx @@ -76,6 +76,7 @@ export const ProfileDrawer: React.FC = ({ }) => { const [showOldPassword, setShowOldPassword] = useState(false); const [showNewPassword, setShowNewPassword] = useState(false); + const [showConfirmPassword, setShowConfirmPassword] = useState(false); const activeRule = getCountryRuleByName(profileCountry); if (!isOpen || !loggedInUser) return null; @@ -275,14 +276,23 @@ export const ProfileDrawer: React.FC = ({
- setChangeConfirmPassword(e.target.value)} - placeholder="Repeat new password" - className="w-full bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs font-semibold text-slate-800 focus:outline-none focus:border-indigo-500" - /> +
+ setChangeConfirmPassword(e.target.value)} + placeholder="Repeat new password" + className="w-full bg-white border border-slate-200 rounded-xl px-3 py-2 pr-10 text-xs font-semibold text-slate-800 focus:outline-none focus:border-indigo-500" + /> + +
-- 2.34.1