From 816aa6137b166ea434bc738c33dad614d6de483d Mon Sep 17 00:00:00 2001 From: gregfromstl Date: Sat, 10 May 2025 17:10:32 +0000 Subject: [PATCH] [Dashboard] Fix: Display latest value in PayNewCustomers component (#7002) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.ai/code) --- ## PR-Codex overview This PR focuses on improving the logic used to display the total value in the `SkeletonContainer` of the `PayNewCustomers` component. It ensures that when `graphData` is empty, it returns "NA", and otherwise, it retrieves the last value or defaults to 0. ### Detailed summary - Updated the logic in `SkeletonContainer`: - Changed the expression to return `graphData[graphData.length - 1]?.value || 0` when `graphData` is not empty. - Maintained the output of "NA" when `isEmpty` is true. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .../pay/PayAnalytics/components/PayNewCustomers.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/dashboard/src/components/pay/PayAnalytics/components/PayNewCustomers.tsx b/apps/dashboard/src/components/pay/PayAnalytics/components/PayNewCustomers.tsx index 32da883bdb5..6fbecde4345 100644 --- a/apps/dashboard/src/components/pay/PayAnalytics/components/PayNewCustomers.tsx +++ b/apps/dashboard/src/components/pay/PayAnalytics/components/PayNewCustomers.tsx @@ -74,9 +74,7 @@ export function PayNewCustomers(props: {
acc + curr.value, 0) + isEmpty ? "NA" : graphData[graphData.length - 1]?.value || 0 } skeletonData={100} render={(v) => {