@@ -100,16 +100,14 @@ const Plan: React.FC<{
{plan.description}
- {plan.features.map((feature, i) => {
- return (
-
-
-
- {feature}
-
-
- );
- })}
+ {plan.features.map((feature, i) => (
+
+
+
+ {feature}
+
+
+ ))}
@@ -123,43 +121,37 @@ const Plan: React.FC<{
);
};
-export const BillingPlanPicker: React.FC<{
+export const BillingPlanPicker = ({
+ value,
+ activePlan,
+ plans,
+ onPlanChange,
+}: {
value: BillingPlanType;
activePlan: BillingPlanType;
plans: BillingPlansQuery['billingPlans'];
onPlanChange: (plan: BillingPlanType) => void;
-}> = ({ value, activePlan, plans, onPlanChange }) => {
+}): ReactElement => {
return (
-
- {plans.map(plan => {
- return (
-
+ {plans.map(plan => (
+
+
-
-
- );
- })}
+ name={plan.name}
+ price={
+ {
+ [BillingPlanType.Hobby]: 'Free',
+ [BillingPlanType.Enterprise]: 'Contact Us',
+ }[plan.planType] || plan.basePrice
+ }
+ isActive={activePlan === plan.planType}
+ features={planCollection[plan.planType].features}
+ description={planCollection[plan.planType].description}
+ footer={planCollection[plan.planType].footer}
+ />
+
+ ))}
);
};