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 Dessalines
parent 9f75d0a0d3
commit 930a63bb77

View file

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