From 7f1b03f4dcb305de9ec625d2ee403db8e53cc10c Mon Sep 17 00:00:00 2001 From: gbuomprisco Date: Thu, 18 Jul 2024 09:43:53 +0200 Subject: [PATCH] Update pricing display logic in pricing-table The commit refactors how pricing is displayed in the pricing-table component. It now displays the plan label if one exists and defaults to 'billing:custom' otherwise. This provides more flexibility and accuracy in displaying plan details. --- .../billing/gateway/src/components/pricing-table.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/billing/gateway/src/components/pricing-table.tsx b/packages/billing/gateway/src/components/pricing-table.tsx index 745f35268..802db7eeb 100644 --- a/packages/billing/gateway/src/components/pricing-table.tsx +++ b/packages/billing/gateway/src/components/pricing-table.tsx @@ -209,9 +209,13 @@ function PricingItem(
- {lineItem - ? formatCurrency(props.product.currency, lineItem.cost) - : (props.plan.label ?? )} + {lineItem ? ( + formatCurrency(props.product.currency, lineItem.cost) + ) : props.plan.label ? ( + + ) : ( + + )}