Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix registration pending translation bug #2393

Merged
merged 1 commit into from Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/shared/components/home/login.tsx
Expand Up @@ -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 });
Expand Down