From 05097ac6088c13577eaa1ad27c0659ff5ed0d092 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 27 Sep 2023 11:16:58 -0700 Subject: [PATCH] fix: :bug: Have showSuspendedDialog properly defined in account.ts --- packages/client/src/account.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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;