feat: fix showing wrong error messages (#1385)

This commit is contained in:
Yaodong Yu
2022-12-09 15:11:13 +08:00
committed by GitHub
parent e705eecffe
commit b41d8652f0
11 changed files with 48 additions and 19 deletions

View File

@ -224,7 +224,7 @@ class App extends Component {
this.setLanguage(account);
} else {
if (res.data !== "Please login first") {
Setting.showMessage("error", `Failed to sign in: ${res.msg}`);
Setting.showMessage("error", `${i18next.t("application:Failed to sign in")}: ${res.msg}`);
}
}
@ -249,7 +249,7 @@ class App extends Component {
account: null,
});
Setting.showMessage("success", "Logged out successfully");
Setting.showMessage("success", i18next.t("application:Logged out successfully"));
const redirectUri = res.data2;
if (redirectUri !== null && redirectUri !== undefined && redirectUri !== "") {
Setting.goToLink(redirectUri);