Update apps/login/ui/UsernameForm.tsx

Co-authored-by: Elio Bischof <elio@zitadel.com>
This commit is contained in:
Max Peintner
2023-05-24 17:04:49 +02:00
committed by GitHub
parent bd6e830eb9
commit 3810401d8f

View File

@@ -32,12 +32,10 @@ export default function UsernameForm() {
}), }),
}); });
setLoading(false);
if (!res.ok) { if (!res.ok) {
setLoading(false);
throw new Error("Failed to set user"); throw new Error("Failed to set user");
} }
setLoading(false);
return res.json(); return res.json();
} }