-
@@ -492,46 +490,3 @@ function DefaultCheckoutButton(
);
}
-
-function LineItemPrice({
- lineItem,
- plan,
- interval,
- product,
- alwaysDisplayMonthlyPrice = true,
-}: {
- lineItem: z.infer
| undefined;
- plan: {
- label?: string;
- };
- interval: Interval | undefined;
- product: {
- currency: string;
- };
- alwaysDisplayMonthlyPrice?: boolean;
-}) {
- const { i18n } = useTranslation();
- const isYearlyPricing = interval === 'year';
-
- const cost = lineItem
- ? isYearlyPricing
- ? alwaysDisplayMonthlyPrice
- ? Number(lineItem.cost / 12).toFixed(2)
- : lineItem.cost
- : lineItem?.cost
- : 0;
-
- const costString =
- lineItem &&
- formatCurrency({
- currencyCode: product.currency,
- locale: i18n.language,
- value: cost,
- });
-
- const labelString = plan.label && (
-
- );
-
- return costString ?? labelString ?? ;
-}