Skip to content

Commit 82e0786

Browse files
committed
[Dashboard] Add 7-day free trial for Growth plan and Starter plan option
1 parent 950bbae commit 82e0786

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

apps/dashboard/src/@/components/blocks/pricing-card.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export const PricingCard: React.FC<PricingCardProps> = ({
5959
}) => {
6060
const plan = TEAM_PLANS[billingPlan];
6161
const isCustomPrice = typeof plan.price === "string";
62+
// 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
63+
const has7DayTrial =
64+
billingStatus === "noPayment" && billingPlan === "growth";
6265

6366
const trackEvent = useTrack();
6467
const remainingTrialDays =
@@ -118,6 +121,12 @@ export const PricingCard: React.FC<PricingCardProps> = ({
118121
)}
119122
</div>
120123

124+
{has7DayTrial && (
125+
<p className="text-muted-foreground text-sm">
126+
7&nbsp;day free trial
127+
</p>
128+
)}
129+
121130
{remainingTrialDays > 0 && (
122131
<p className="text-muted-foreground text-sm">
123132
Your free trial will{" "}

apps/dashboard/src/app/(app)/login/onboarding/team-onboarding/InviteTeamMembers.tsx

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ export function InviteTeamMembersUI(props: {
9797
recommendedMembers={[]}
9898
customCTASection={
9999
<div className="flex gap-3">
100-
{(props.team.billingPlan === "free" ||
101-
props.team.billingPlan === "starter") && (
100+
{props.team.billingPlan === "free" && (
102101
<Button
103102
size="sm"
104103
variant="default"
@@ -155,8 +154,30 @@ function InviteModalContent(props: {
155154
getTeam: () => Promise<Team>;
156155
teamId: string;
157156
}) {
158-
const [planToShow, setPlanToShow] = useState<"growth" | "scale" | "pro">(
159-
"growth",
157+
const [planToShow, setPlanToShow] = useState<
158+
"starter" | "growth" | "scale" | "pro"
159+
>("growth");
160+
161+
const starterPlan = (
162+
<PricingCard
163+
billingPlan="starter"
164+
billingStatus={props.billingStatus}
165+
teamSlug={props.teamSlug}
166+
cta={{
167+
label: "Get Started",
168+
type: "checkout",
169+
onClick() {
170+
props.trackEvent({
171+
category: "teamOnboarding",
172+
action: "upgradePlan",
173+
label: "attempt",
174+
plan: "starter",
175+
});
176+
},
177+
}}
178+
getTeam={props.getTeam}
179+
teamId={props.teamId}
180+
/>
160181
);
161182

162183
const growthPlan = (
@@ -233,7 +254,7 @@ function InviteModalContent(props: {
233254
Choose a plan
234255
</SheetTitle>
235256
<SheetDescription className="text-left leading-relaxed">
236-
Get started with the free Starter plan or upgrade to Growth plan for
257+
Get started with the Starter plan or upgrade to Growth plan for
237258
increased limits and advanced features.{" "}
238259
<UnderlineLink href="https://thirdweb.com/pricing" target="_blank">
239260
Learn more about pricing
@@ -245,6 +266,7 @@ function InviteModalContent(props: {
245266

246267
{/* Desktop */}
247268
<div className="hidden grid-cols-1 gap-6 md:grid-cols-4 md:gap-4 lg:grid">
269+
{starterPlan}
248270
{growthPlan}
249271
{scalePlan}
250272
{proPlan}
@@ -254,6 +276,11 @@ function InviteModalContent(props: {
254276
<div className="lg:hidden">
255277
<TabButtons
256278
tabs={[
279+
{
280+
name: "Starter",
281+
onClick: () => setPlanToShow("starter"),
282+
isActive: planToShow === "starter",
283+
},
257284
{
258285
name: "Growth",
259286
onClick: () => setPlanToShow("growth"),

0 commit comments

Comments
 (0)