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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user