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.
This commit is contained in:
@@ -209,9 +209,13 @@ function PricingItem(
|
|||||||
|
|
||||||
<div className={'flex flex-col space-y-1'}>
|
<div className={'flex flex-col space-y-1'}>
|
||||||
<Price>
|
<Price>
|
||||||
{lineItem
|
{lineItem ? (
|
||||||
? formatCurrency(props.product.currency, lineItem.cost)
|
formatCurrency(props.product.currency, lineItem.cost)
|
||||||
: (props.plan.label ?? <Trans i18nKey={'billing:custom'} />)}
|
) : props.plan.label ? (
|
||||||
|
<Trans i18nKey={props.plan.label} defaults={props.plan.label} />
|
||||||
|
) : (
|
||||||
|
<Trans i18nKey={'billing:custom'} />
|
||||||
|
)}
|
||||||
</Price>
|
</Price>
|
||||||
|
|
||||||
<If condition={props.plan.name}>
|
<If condition={props.plan.name}>
|
||||||
|
|||||||
Reference in New Issue
Block a user