mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-21 22:27:11 +00:00
Fix registration pending translation bug (#2393)
This commit is contained in:
parent
a860bdd700
commit
610789242b
|
@ -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 });
|
||||
|
|
Loading…
Reference in a new issue