From be216896393efd4595f2adf8db47329ecebdbb70 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 15 Oct 2023 11:54:48 +0800 Subject: [PATCH] Added confirm password field --- src/routes/Register/Register.tsx | 98 +++++++++++++++++++++----------- 1 file changed, 64 insertions(+), 34 deletions(-) diff --git a/src/routes/Register/Register.tsx b/src/routes/Register/Register.tsx index c563f26..03ed006 100644 --- a/src/routes/Register/Register.tsx +++ b/src/routes/Register/Register.tsx @@ -23,6 +23,7 @@ export default function Register() { const toast = useToast(); // const dispatch = useDispatch(); // const creds = useSelector((state: RootState) => state.auth.creds); + const [registering, setRegistering] = useState(false); const [user, setUser] = useState({ first_name: "", last_name: "", @@ -30,6 +31,7 @@ export default function Register() { username: "", email: "", password: "", + confirm_password: "", }); return ( @@ -121,49 +123,77 @@ export default function Register() { }} /> + + ): void => { + setUser({ ...user, confirm_password: e.nativeEvent.text }); + }} + /> +