From 17e1ea5f4bb59ccb31fbda6db85c6ee25369f7e6 Mon Sep 17 00:00:00 2001 From: skynono <6811626@qq.com> Date: Mon, 9 Jun 2025 01:16:35 +0800 Subject: [PATCH] fix: balance unit sync --- web/src/components/table/ChannelsTable.js | 6 +++--- web/src/helpers/render.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/components/table/ChannelsTable.js b/web/src/components/table/ChannelsTable.js index 105aa217..8302f5ce 100644 --- a/web/src/components/table/ChannelsTable.js +++ b/web/src/components/table/ChannelsTable.js @@ -6,7 +6,7 @@ import { showSuccess, timestamp2string, renderGroup, - renderNumberWithPoint, + renderQuotaWithAmount, renderQuota } from '../../helpers/index.js'; @@ -328,7 +328,7 @@ const ChannelsTable = () => { {renderQuota(record.used_quota)} - + { shape='circle' onClick={() => updateChannelBalance(record)} > - ${renderNumberWithPoint(record.balance)} + {renderQuotaWithAmount(record.balance)} diff --git a/web/src/helpers/render.js b/web/src/helpers/render.js index 833a046d..6a6752ed 100644 --- a/web/src/helpers/render.js +++ b/web/src/helpers/render.js @@ -764,7 +764,7 @@ export function renderQuotaWithAmount(amount) { if (displayInCurrency) { return '$' + amount; } else { - return renderUnitWithQuota(amount); + return renderNumber(renderUnitWithQuota(amount)); } }