Add Toast Messages for Bad Logins (#1874)

* Added toast prompts

* Using generic  message instead.

---------

Co-authored-by: Jacob Rosenzweig <rosenjcb@Jacobs-MacBook-Pro.local>
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
This commit is contained in:
rosenjcb 2023-07-12 07:01:47 -07:00 committed by GitHub
parent 2911cd8cdb
commit 7a804ff333
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,6 +169,9 @@ export class Login extends Component<any, State> {
i.setState({ showTotp: true });
toast(I18NextService.i18n.t("enter_two_factor_code"), "info");
}
if (loginRes.msg === "incorrect_login") {
toast(I18NextService.i18n.t("incorrect_login"), "danger");
}
i.setState({ loginRes: { state: "failed", msg: loginRes.msg } });
break;