reset input value on submit

This commit is contained in:
muzam1l
2022-07-01 16:27:13 +05:30
parent f163b052e1
commit dfa35df465

View File

@@ -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);