From dfa35df465dc9ca7335631662776d892fe5c7966 Mon Sep 17 00:00:00 2001 From: muzam1l Date: Fri, 1 Jul 2022 16:27:13 +0530 Subject: [PATCH] reset input value on submit --- components/Accounts.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/Accounts.tsx b/components/Accounts.tsx index 6b53fb6..a979c62 100644 --- a/components/Accounts.tsx +++ b/components/Accounts.tsx @@ -530,10 +530,11 @@ const ImportAccountDialog = ({ const labelText = type === "import" ? "Account secret" : "Account Name"; const cancelText = type === "import" ? "Cancel" : "Skip"; - const handleSubmit = () => { + const handleSubmit = async () => { if (type === "create") { const name = capitalize(value); - addFaucetAccount(name, true); + await addFaucetAccount(name, true); + setValue(""); return; } importAccount(value);