Clears username+password fields on successful register

This commit is contained in:
Peter KW 2024-04-01 02:17:57 +02:00
parent 58deef400a
commit dc98fb510e

View file

@ -22,6 +22,8 @@ export default function Register(): JSX.Element {
const response = await api.registerUser(newUser);
if (response.success) {
alert("User added!");
setPassword("");
setUsername("");
} else {
alert("User not added");
setErrMessage(response.message ?? "Unknown error");