From 477d77cdc15cd05607999142f358f2fd5b785831 Mon Sep 17 00:00:00 2001 From: Truman Gao <106889354+tdgao@users.noreply.github.com> Date: Thu, 1 Jan 2026 16:27:53 -0800 Subject: [PATCH] fix: balance displaying NaN (#5024) * convert string to num * another potentional string addition * remove return statement * fix formatting --- apps/frontend/src/pages/dashboard/revenue/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/frontend/src/pages/dashboard/revenue/index.vue b/apps/frontend/src/pages/dashboard/revenue/index.vue index 64c292382..f3ec3ab4e 100644 --- a/apps/frontend/src/pages/dashboard/revenue/index.vue +++ b/apps/frontend/src/pages/dashboard/revenue/index.vue @@ -440,7 +440,7 @@ const processingDate = computed<{ date: string; amount: number }>(() => { }) const grandTotal = computed(() => - userBalance.value ? userBalance.value.available + userBalance.value.pending : 0, + userBalance.value ? Number(userBalance.value.available) + Number(userBalance.value.pending) : 0, ) const hasTinMismatch = computed(() => { @@ -508,7 +508,7 @@ const segments = computed(() => { const upcoming = processing.date ? dates.filter((d) => d.date !== processing.date) : dates const totalPending = userBalance.value?.pending ?? 0 - const total = available + totalPending + const total = Number(available) + Number(totalPending) if (total <= 0) return [] as RevenueBarSegment[]