mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-11-11 18:03:30 +08:00
overwriting message on failed login
This commit is contained in:
parent
34277e2098
commit
f021ff1374
1 changed files with 7 additions and 1 deletions
|
@ -141,7 +141,13 @@ export function signIn() {
|
|||
//TODO: redirect user to relevant page
|
||||
})
|
||||
.catch(function (error) {
|
||||
Notifications.add(error.message, -1);
|
||||
let message = error.message;
|
||||
if (error.code === "auth/wrong-password") {
|
||||
message = "Incorrect password.";
|
||||
} else if (error.code === "auth/user-not-found") {
|
||||
message = "User not found.";
|
||||
}
|
||||
Notifications.add(message, -1);
|
||||
$(".pageLogin .preloader").addClass("hidden");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue