import { memo } from "react"; import { Skeleton } from "@turbostarter/ui-web/skeleton"; import { Plan } from "./plan/plan"; import type { User } from "@turbostarter/auth"; import type { BillingModel, Discount, PricingPlan, RecurringInterval, } from "@turbostarter/billing"; interface PlansProps { readonly plans: PricingPlan[]; readonly discounts: Discount[]; readonly user: User | null; readonly interval: RecurringInterval; readonly model: BillingModel; readonly currency: string; } export const Plans = memo( ({ plans, discounts, interval, user, model, currency }) => { return (
{plans.map((plan) => ( ))}
); }, ); export const PlansSkeleton = () => { return (
{Array.from({ length: 2 }).map((_, i) => (
))}
); }; Plans.displayName = "Plans";