diff --git a/packages/client/src/account.ts b/packages/client/src/account.ts index bb526846e1..1f8d512a07 100644 --- a/packages/client/src/account.ts +++ b/packages/client/src/account.ts @@ -97,9 +97,9 @@ function fetchAccount(token: string): Promise { .then((res) => { if (res.error) { if (res.error.id === "a8c724b3-6e9c-4b46-b1a8-bc3ed6258370") { - showSuspendedDialog().then(() => { - signout(); - }); + showSuspendedDialog(); + signout(); + return; } else { alert({ type: "error", @@ -116,6 +116,14 @@ function fetchAccount(token: string): Promise { }); } +function showSuspendedDialog() { + alert({ + type: "error", + title: i18n.ts.yourAccountSuspendedTitle, + text: i18n.ts.yourAccountSuspendedDescription, + }); +} + export function updateAccount(accountData) { for (const [key, value] of Object.entries(accountData)) { $i[key] = value;