From 0eac3bbb04e601e625394b14b05f259a6e61ccbb Mon Sep 17 00:00:00 2001 From: Mauricio Araujo Date: Tue, 7 May 2024 14:45:17 -0400 Subject: [PATCH] Use processed costs and usage for charts (#4615) --- .../src/main/home/project-settings/UsagePage.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dashboard/src/main/home/project-settings/UsagePage.tsx b/dashboard/src/main/home/project-settings/UsagePage.tsx index 9acbc27706..fde7a5b312 100644 --- a/dashboard/src/main/home/project-settings/UsagePage.tsx +++ b/dashboard/src/main/home/project-settings/UsagePage.tsx @@ -128,14 +128,13 @@ function UsagePage(): JSX.Element { prefix={<>Billing period} /> - {costs && - costs.length > 0 && - usage && - usage.length > 0 && - usage[0].usage_metrics.length > 0 ? ( + {processedCosts && + processedCosts.length > 0 && + processedUsage && + processedUsage.length > 0 ? ( <> - Total cost: ${computeTotalCost(costs)} + Total cost: ${computeTotalCost(processedCosts)}