From fd4d6648b0588060ba902167dae7a0e51d8aa6e0 Mon Sep 17 00:00:00 2001 From: fahed Date: Mon, 23 Feb 2026 15:02:07 +0300 Subject: [PATCH] Add password confirmation field to setup form Co-Authored-By: Claude Opus 4.6 --- client/src/pages/Login.jsx | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/client/src/pages/Login.jsx b/client/src/pages/Login.jsx index d147609..2c9706f 100644 --- a/client/src/pages/Login.jsx +++ b/client/src/pages/Login.jsx @@ -18,6 +18,7 @@ export default function Login() { const [setupName, setSetupName] = useState('') const [setupEmail, setSetupEmail] = useState('') const [setupPassword, setSetupPassword] = useState('') + const [setupConfirm, setSetupConfirm] = useState('') const [setupDone, setSetupDone] = useState(false) useEffect(() => { @@ -42,6 +43,10 @@ export default function Login() { const handleSetup = async (e) => { e.preventDefault() setError('') + if (setupPassword !== setupConfirm) { + setError('Passwords do not match') + return + } setLoading(true) try { @@ -143,6 +148,23 @@ export default function Login() { + {/* Confirm Password */} +
+ +
+ + setSetupConfirm(e.target.value)} + className="w-full pl-11 pr-4 py-3 bg-slate-900/50 border border-slate-700 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all" + placeholder="Re-enter your password" + required + minLength={6} + /> +
+
+ {/* Error */} {error && (