瀏覽代碼

Merge branch 'cc-project' of github.com:porter-dev/porter into cc-project

sunguroku 2 年之前
父節點
當前提交
bfc4b0926b
共有 1 個文件被更改,包括 5 次插入6 次删除
  1. 5 6
      dashboard/src/main/home/project-settings/UsagePage.tsx

+ 5 - 6
dashboard/src/main/home/project-settings/UsagePage.tsx

@@ -128,14 +128,13 @@ function UsagePage(): JSX.Element {
         prefix={<>Billing period</>}
       />
       <Spacer y={1} />
-      {costs &&
-      costs.length > 0 &&
-      usage &&
-      usage.length > 0 &&
-      usage[0].usage_metrics.length > 0 ? (
+      {processedCosts &&
+      processedCosts.length > 0 &&
+      processedUsage &&
+      processedUsage.length > 0 ? (
         <>
           <BarWrapper>
-            <Total>Total cost: ${computeTotalCost(costs)}</Total>
+            <Total>Total cost: ${computeTotalCost(processedCosts)}</Total>
             <Bars
               fill="#8784D2"
               yKey="cost"