From 6101084439a22ecfd8b4e0a5c93a851180ef565f Mon Sep 17 00:00:00 2001 From: Matt Aitken Date: Sun, 3 Dec 2023 12:10:25 +0000 Subject: [PATCH] Onboarding price selection working --- .../app/components/billing/PricingTiers.tsx | 36 +++++++++++++------ .../route.tsx | 13 +++++-- .../webapp/app/routes/_app.orgs.new/route.tsx | 19 +++++++--- 3 files changed, 52 insertions(+), 16 deletions(-) diff --git a/apps/webapp/app/components/billing/PricingTiers.tsx b/apps/webapp/app/components/billing/PricingTiers.tsx index 5726be8ab..342107a7d 100644 --- a/apps/webapp/app/components/billing/PricingTiers.tsx +++ b/apps/webapp/app/components/billing/PricingTiers.tsx @@ -5,7 +5,7 @@ import { Form, useActionData, useNavigation } from "@remix-run/react"; import { ActiveSubscription, Plan, Plans, SetPlanBodySchema } from "@trigger.dev/billing"; import { cn } from "~/utils/cn"; import { DefinitionTip } from "../DefinitionTooltip"; -import { Button } from "../primitives/Buttons"; +import { Button, LinkButton } from "../primitives/Buttons"; import { Paragraph } from "../primitives/Paragraph"; import SegmentedControl from "../primitives/SegmentedControl"; import { formatNumberCompact } from "~/utils/numberFormatter"; @@ -45,11 +45,13 @@ export function PricingTiers({ plans, className, showActionText = true, + freeButtonPath, }: { organizationSlug: string; plans: Plans; className?: string; showActionText?: boolean; + freeButtonPath?: string; }) { const currentPlan = useCurrentPlan(); //if they've canceled, we set the subscription to undefined so they can re-upgrade @@ -70,6 +72,7 @@ export function PricingTiers({ currentSubscription={currentSubscription} organizationSlug={organizationSlug} showActionText={showActionText} + buttonPath={freeButtonPath} /> - + {buttonPath ? ( + + {actionText} + + ) : ( + + )}