From eaaa5f250be283634513c867f7d8d622d8a15a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 5 Aug 2026 17:38:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E6=B3=A5=E7=82=B9=E4=BD=99?= =?UTF-8?q?=E9=A2=9D=E5=B1=95=E7=A4=BA=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 提取泥点余额格式化函数,移除统计卡中的嵌套三元表达式。 --- .../PlatformActiveProfileView.tsx | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/components/platform-entry/PlatformActiveProfileView.tsx b/src/components/platform-entry/PlatformActiveProfileView.tsx index 034ce759d..27468698e 100644 --- a/src/components/platform-entry/PlatformActiveProfileView.tsx +++ b/src/components/platform-entry/PlatformActiveProfileView.tsx @@ -243,6 +243,19 @@ function formatDashboardCount(value: number) { return Math.max(0, Math.round(value)).toLocaleString('zh-CN'); } +function formatWalletBalance( + balance: ProfileMudPointBalance | null, + isLoading: boolean, +) { + if (balance) { + return formatDashboardCount(balance.totalPoints); + } + if (isLoading) { + return '读取中'; + } + return '暂不可用'; +} + function formatTotalPlayTime(value: number) { const hours = Math.max(0, Math.round(value / 360000) / 10); return `${hours.toLocaleString('zh-CN', { @@ -547,13 +560,10 @@ export function PlatformActiveProfileView({