From c3c5fafc738ff5a1c01366bd22c3d39ecd711241 Mon Sep 17 00:00:00 2001 From: keannu125 Date: Fri, 10 Mar 2023 21:18:47 +0800 Subject: [PATCH] Make registration properly reset forms once register button is pressed --- src/Routes/Register/Register.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Routes/Register/Register.tsx b/src/Routes/Register/Register.tsx index 40fc27f..1224982 100644 --- a/src/Routes/Register/Register.tsx +++ b/src/Routes/Register/Register.tsx @@ -66,7 +66,9 @@ export default function Register() { variant="contained" onClick={async () => { setUser({ - ...user, + email: "", + username: "", + password: "", }); if (await UserRegister(user)) { setFeedback(