Update pricing table and billing configuration

Updated the pricing table component to display all line items for a plan, removed condition to exclude primary plan. Adjusted the type of a billing package in the sample configuration to be "metered" instead of "flat". Made related changes in line-item-details component to handle the changes in billing type and to fix the layout.
This commit is contained in:
giancarlo
2024-06-01 15:59:39 +07:00
parent 88ff32479a
commit 2c52a06536
4 changed files with 51 additions and 22 deletions

View File

@@ -152,9 +152,7 @@ function PricingItem(
// we want to exclude the primary plan from the list of line items
// since we are displaying the primary line item separately as the main price
const lineItemsToDisplay = props.plan.lineItems.filter((item) => {
return item.id !== lineItem?.id;
});
const lineItemsToDisplay = props.plan.lineItems;
return (
<div
@@ -218,10 +216,10 @@ function PricingItem(
<If condition={props.plan.name}>
<span
className={cn(
`animate-in slide-in-from-left-4 fade-in flex items-center space-x-0.5 text-sm capitalize`,
`animate-in slide-in-from-left-4 fade-in text-muted-foreground flex items-center space-x-0.5 text-sm capitalize`,
)}
>
<span className={'text-muted-foreground'}>
<span>
<If
condition={props.plan.interval}
fallback={<Trans i18nKey={'billing:lifetime'} />}