From: rosenjcb Date: Wed, 12 Jul 2023 14:01:47 +0000 (-0700) Subject: Add Toast Messages for Bad Logins (#1874) X-Git-Url: http://these/git/%22%7Burl%7D/%22https:/image.com/%7BimageSrc%7D?a=commitdiff_plain;h=7a804ff33323615b727c1cc8172e168e354f11db;p=lemmy-ui.git Add Toast Messages for Bad Logins (#1874) * Added toast prompts * Using generic message instead. --------- Co-authored-by: Jacob Rosenzweig Co-authored-by: SleeplessOne1917 --- diff --git a/src/shared/components/home/login.tsx b/src/shared/components/home/login.tsx index e2986b5..62e5721 100644 --- a/src/shared/components/home/login.tsx +++ b/src/shared/components/home/login.tsx @@ -169,6 +169,9 @@ export class Login extends Component { 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;