fix: 🐛 Have showSuspendedDialog properly defined in account.ts
This commit is contained in:
parent
26bc90e44b
commit
05097ac608
1 changed files with 11 additions and 3 deletions
|
@ -97,9 +97,9 @@ function fetchAccount(token: string): Promise<Account> {
|
|||
.then((res) => {
|
||||
if (res.error) {
|
||||
if (res.error.id === "a8c724b3-6e9c-4b46-b1a8-bc3ed6258370") {
|
||||
showSuspendedDialog().then(() => {
|
||||
showSuspendedDialog();
|
||||
signout();
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
alert({
|
||||
type: "error",
|
||||
|
@ -116,6 +116,14 @@ function fetchAccount(token: string): Promise<Account> {
|
|||
});
|
||||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue