Update pricing table to exclude flat line items

The pricing table component now filters out flat line items as they do not require further explanation. Consequently, changes have been made to the billing sample configuration file, turning a previously metered item into a flat one for clearer demonstration of usage.
This commit is contained in:
giancarlo
2024-06-02 12:22:52 +07:00
parent ced1b4f7e3
commit 26b2eed60d
2 changed files with 6 additions and 11 deletions

View File

@@ -150,9 +150,11 @@ function PricingItem(
const lineItem = props.primaryLineItem;
// 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;
// we exclude flat line items from the details since
// it doesn't need further explanation
const lineItemsToDisplay = props.plan.lineItems.filter((item) => {
return item.type !== 'flat';
});
return (
<div