diff --git a/apps/dashboard/src/@/components/blocks/pricing-card.tsx b/apps/dashboard/src/@/components/blocks/pricing-card.tsx index e293ab0b570..f427effc492 100644 --- a/apps/dashboard/src/@/components/blocks/pricing-card.tsx +++ b/apps/dashboard/src/@/components/blocks/pricing-card.tsx @@ -32,6 +32,7 @@ type PricingCardProps = { current?: boolean; canTrialGrowth?: boolean; activeTrialEndsAt?: string; + redirectPath: string; }; export const PricingCard: React.FC = ({ @@ -42,6 +43,7 @@ export const PricingCard: React.FC = ({ current = false, canTrialGrowth = false, activeTrialEndsAt, + redirectPath, }) => { const plan = TEAM_PLANS[billingPlan]; const isCustomPrice = typeof plan.price === "string"; @@ -129,6 +131,7 @@ export const PricingCard: React.FC = ({ variant={cta.variant || "outline"} teamSlug={teamSlug} sku={billingPlan === "starter" ? "plan:starter" : "plan:growth"} + redirectPath={redirectPath} > {cta.title} diff --git a/apps/dashboard/src/app/login/LoginPage.tsx b/apps/dashboard/src/app/login/LoginPage.tsx index 2121d552ada..67b588d4e67 100644 --- a/apps/dashboard/src/app/login/LoginPage.tsx +++ b/apps/dashboard/src/app/login/LoginPage.tsx @@ -151,7 +151,11 @@ function PageContent(props: { if (screen.id === "onboarding") { return ( }> - + ); } diff --git a/apps/dashboard/src/app/login/onboarding/ChoosePlan.tsx b/apps/dashboard/src/app/login/onboarding/ChoosePlan.tsx index 37c99c3bbcb..d32c12fd4d6 100644 --- a/apps/dashboard/src/app/login/onboarding/ChoosePlan.tsx +++ b/apps/dashboard/src/app/login/onboarding/ChoosePlan.tsx @@ -9,6 +9,7 @@ export function OnboardingChoosePlan(props: { skipPlan: () => Promise; canTrialGrowth: boolean; teamSlug: string; + redirectPath: string; }) { return (
@@ -29,6 +30,7 @@ export function OnboardingChoosePlan(props: { category: "account", }, }} + redirectPath={props.redirectPath} />
diff --git a/apps/dashboard/src/app/login/onboarding/on-boarding-ui.client.tsx b/apps/dashboard/src/app/login/onboarding/on-boarding-ui.client.tsx index 3efa11aef41..74b6271e27b 100644 --- a/apps/dashboard/src/app/login/onboarding/on-boarding-ui.client.tsx +++ b/apps/dashboard/src/app/login/onboarding/on-boarding-ui.client.tsx @@ -20,6 +20,8 @@ type OnboardingScreen = function OnboardingUI(props: { account: Account; onComplete: () => void; + // path to redirect from stripe + redirectPath: string; }) { const { account } = props; const [screen, setScreen] = useState({ id: "onboarding" }); @@ -128,6 +130,7 @@ function OnboardingUI(props: { {screen.id === "plan" && ( { await skipOnboarding().catch(() => {}); diff --git a/apps/dashboard/src/components/settings/Account/Billing/Pricing.tsx b/apps/dashboard/src/components/settings/Account/Billing/Pricing.tsx index 70ad0960a90..e24aec1a3de 100644 --- a/apps/dashboard/src/components/settings/Account/Billing/Pricing.tsx +++ b/apps/dashboard/src/components/settings/Account/Billing/Pricing.tsx @@ -18,6 +18,7 @@ export const BillingPricing: React.FC = ({ team, trialPeriodEndedAt, }) => { + const pagePath = `/team/${team.slug}/~/settings/billing`; const validTeamPlan = getValidTeamPlan(team); const contactUsHref = "/contact-us"; @@ -102,6 +103,7 @@ export const BillingPricing: React.FC = ({
{/* Starter */} = ({ {/* Growth */} = ({ />