From 610789242bfd8ddf5749bd21ac81f206ae9bfca1 Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com> Date: Fri, 22 Mar 2024 18:29:22 -0400 Subject: [PATCH] Fix registration pending translation bug (#2393) --- src/shared/components/home/login.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/shared/components/home/login.tsx b/src/shared/components/home/login.tsx index d0c1becf..0927d10e 100644 --- a/src/shared/components/home/login.tsx +++ b/src/shared/components/home/login.tsx @@ -77,7 +77,15 @@ async function handleLoginSubmit(i: Login, event: any) { if (loginRes.err.message === "missing_totp_token") { i.setState({ show2faModal: true }); } else { - toast(I18NextService.i18n.t(loginRes.err.message), "danger"); + // TODO: We shouldn't be passing error messages as args into i18next + toast( + I18NextService.i18n.t( + loginRes.err.message === "registration_application_is_pending" + ? "registration_application_pending" + : loginRes.err.message, + ), + "danger", + ); } i.setState({ loginRes });