From dc98fb510e896259169b658b0453c60ceb9627f6 Mon Sep 17 00:00:00 2001 From: Peter KW Date: Mon, 1 Apr 2024 02:17:57 +0200 Subject: [PATCH] Clears username+password fields on successful register --- frontend/src/Components/Register.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frontend/src/Components/Register.tsx b/frontend/src/Components/Register.tsx index 6192637..8a22806 100644 --- a/frontend/src/Components/Register.tsx +++ b/frontend/src/Components/Register.tsx @@ -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");