]> Untitled Git - lemmy-ui.git/commitdiff
Add Toast Messages for Bad Logins (#1874)
authorrosenjcb <rosenjcb@gmail.com>
Wed, 12 Jul 2023 14:01:47 +0000 (07:01 -0700)
committerGitHub <noreply@github.com>
Wed, 12 Jul 2023 14:01:47 +0000 (10:01 -0400)
* Added toast prompts

* Using generic  message instead.

---------

Co-authored-by: Jacob Rosenzweig <rosenjcb@Jacobs-MacBook-Pro.local>
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
src/shared/components/home/login.tsx

index e2986b57dc15cbc4c9e08fedbd9a1e1a7ccfe73e..62e5721409beb93472e5a3157060b8d42319858e 100644 (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;