Make registration properly reset forms once register button is pressed

This commit is contained in:
keannu125 2023-03-10 21:18:47 +08:00
parent 679fdc96e8
commit c3c5fafc73

View file

@ -66,7 +66,9 @@ export default function Register() {
variant="contained" variant="contained"
onClick={async () => { onClick={async () => {
setUser({ setUser({
...user, email: "",
username: "",
password: "",
}); });
if (await UserRegister(user)) { if (await UserRegister(user)) {
setFeedback( setFeedback(