fix: 🐛 Have showSuspendedDialog properly defined in account.ts
This commit is contained in:
parent
26bc90e44b
commit
05097ac608
@ -97,9 +97,9 @@ function fetchAccount(token: string): Promise<Account> {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
if (res.error.id === "a8c724b3-6e9c-4b46-b1a8-bc3ed6258370") {
|
if (res.error.id === "a8c724b3-6e9c-4b46-b1a8-bc3ed6258370") {
|
||||||
showSuspendedDialog().then(() => {
|
showSuspendedDialog();
|
||||||
signout();
|
signout();
|
||||||
});
|
return;
|
||||||
} else {
|
} else {
|
||||||
alert({
|
alert({
|
||||||
type: "error",
|
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) {
|
export function updateAccount(accountData) {
|
||||||
for (const [key, value] of Object.entries(accountData)) {
|
for (const [key, value] of Object.entries(accountData)) {
|
||||||
$i[key] = value;
|
$i[key] = value;
|
||||||
|
Loading…
Reference in New Issue
Block a user