From 28803acb3263ba263ca6417c555a8b2d273a2a8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Gr=C3=BCneberg?= Date: Tue, 9 Dec 2025 12:01:08 +0800 Subject: [PATCH] chore: do not show projected cost if not set (#41131) API can return undefined or 0 for projected cost, in that case we do not want to display it. --- .../BillingBreakdown/UpcomingInvoice.tsx | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/UpcomingInvoice.tsx b/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/UpcomingInvoice.tsx index 4b7feab3e57..d9405b96769 100644 --- a/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/UpcomingInvoice.tsx +++ b/apps/studio/components/interfaces/Organization/BillingSettings/BillingBreakdown/UpcomingInvoice.tsx @@ -288,20 +288,23 @@ const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => { {formatCurrency(upcomingInvoice?.amount_total) ?? '-'} - - - Projected Costs - - Projected costs at the end of the billing cycle. Includes predictable costs - for Compute Hours, IPv4, Custom Domain and Point-In-Time-Recovery, but no - costs for metrics like MAU, storage or function invocations. Final amounts may - vary depending on your usage. - - - - {formatCurrency(upcomingInvoice?.amount_projected) ?? '-'} - - + + {upcomingInvoice?.amount_projected && ( + + + Projected Costs + + Projected costs at the end of the billing cycle. Includes predictable costs + for Compute Hours, IPv4, Custom Domain and Point-In-Time-Recovery, but no + costs for metrics like MAU, storage or function invocations. Final amounts + may vary depending on your usage. + + + + {formatCurrency(upcomingInvoice.amount_projected) ?? '-'} + + + )}