@@ -16,7 +16,6 @@ import { CheckoutButton } from "../billing";
1616
1717type PricingCardCta = {
1818 hint ?: string ;
19-
2019 onClick ?: ( ) => void ;
2120} & (
2221 | {
@@ -58,12 +57,17 @@ export const PricingCard: React.FC<PricingCardProps> = ({
5857 activeTrialEndsAt,
5958} ) => {
6059 const plan = TEAM_PLANS [ billingPlan ] ;
61- const isCustomPrice = typeof plan . price === "string" ;
6260
6361 const trackEvent = useTrack ( ) ;
6462 const remainingTrialDays =
6563 ( activeTrialEndsAt ? remainingDays ( activeTrialEndsAt ) : 0 ) || 0 ;
6664
65+ // if the team has just signed up and has not subscribed yet, and the billing plan is growth, then they get a 7 day trial
66+ const has7DayTrial =
67+ remainingTrialDays === 0 &&
68+ billingStatus === "noPayment" &&
69+ billingPlan === "growth" ;
70+
6771 const handleCTAClick = ( ) => {
6872 cta ?. onClick ?.( ) ;
6973 trackEvent ( {
@@ -97,6 +101,7 @@ export const PricingCard: React.FC<PricingCardProps> = ({
97101 { plan . title }
98102 </ h3 >
99103 { current && < Badge className = "capitalize" > Current plan</ Badge > }
104+ { has7DayTrial && < Badge variant = "success" > 7 Day Free Trial</ Badge > }
100105 </ div >
101106 < p className = "max-w-[320px] text-muted-foreground text-sm" >
102107 { plan . description }
@@ -108,15 +113,23 @@ export const PricingCard: React.FC<PricingCardProps> = ({
108113 { plan . isStartingPriceOnly && (
109114 < span className = "text-muted-foreground text-xs" > Starting at</ span >
110115 ) }
111- < div className = "flex items-center gap-2" >
112- < span className = "font-semibold text-2xl text-foreground tracking-tight" >
113- ${ plan . price . toLocaleString ( ) }
114- </ span >
115-
116- { ! isCustomPrice && (
116+ { has7DayTrial ? (
117+ < div className = "flex flex-col items-start gap-0" >
118+ < span className = "font-bold text-2xl text-foreground tracking-tight" >
119+ 7 days free
120+ </ span >
121+ < span className = "text-muted-foreground text-sm" >
122+ Then ${ plan . price . toLocaleString ( ) } / month
123+ </ span >
124+ </ div >
125+ ) : (
126+ < div className = "flex items-center gap-2" >
127+ < span className = "font-semibold text-2xl text-foreground tracking-tight" >
128+ ${ plan . price . toLocaleString ( ) }
129+ </ span >
117130 < span className = "text-muted-foreground" > / month</ span >
118- ) }
119- </ div >
131+ </ div >
132+ ) }
120133
121134 { remainingTrialDays > 0 && (
122135 < p className = "text-muted-foreground text-sm" >
@@ -155,7 +168,7 @@ export const PricingCard: React.FC<PricingCardProps> = ({
155168 teamSlug = { teamSlug }
156169 sku = { billingPlanToSkuMap [ billingPlan ] }
157170 >
158- { cta . label }
171+ { has7DayTrial ? "Start 7 Day Free Trial" : cta . label }
159172 </ CheckoutButton >
160173 ) }
161174
@@ -166,7 +179,7 @@ export const PricingCard: React.FC<PricingCardProps> = ({
166179 asChild
167180 >
168181 < Link href = { cta . href } target = "_blank" onClick = { handleCTAClick } >
169- { cta . label }
182+ { has7DayTrial ? "Start 7 Day Free Trial" : cta . label }
170183 </ Link >
171184 </ Button >
172185 ) }
0 commit comments