Skip to content

Commit 3e21656

Browse files
committed
[service-utils] Remove starter_legacy plan type
1 parent a920d1e commit 3e21656

File tree

14 files changed

+12
-82
lines changed

14 files changed

+12
-82
lines changed

.changeset/many-hounds-wave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@thirdweb-dev/service-utils": patch
3+
---
4+
5+
remove `starter_legacy` plan type

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ const billingPlanToSkuMap: Record<Team["billingPlan"], ProductSKU | undefined> =
192192
accelerate: undefined,
193193
free: undefined,
194194
growth_legacy: undefined,
195-
starter_legacy: undefined,
196195
};
197196

198197
type FeatureItemProps = {

apps/dashboard/src/app/(app)/components/TeamPlanBadge.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const teamPlanToBadgeVariant: Record<
1414
free: "secondary",
1515
// yellow
1616
starter: "warning",
17-
starter_legacy: "warning",
17+
1818
growth_legacy: "warning",
1919
// green
2020
accelerate: "success",
@@ -28,9 +28,7 @@ export function getTeamPlanBadgeLabel(plan: Team["billingPlan"]) {
2828
if (plan === "growth_legacy") {
2929
return "Growth - Legacy";
3030
}
31-
if (plan === "starter_legacy") {
32-
return "Starter - Legacy";
33-
}
31+
3432
return plan;
3533
}
3634

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard.stories.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ export const Free: Story = {
2424
},
2525
};
2626

27-
export const StarterLegacy: Story = {
28-
args: {
29-
plan: "starter_legacy",
30-
},
31-
};
32-
3327
export const Starter: Story = {
3428
args: {
3529
plan: "starter",

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,7 @@ export function PlanInfoCardUI(props: {
6868
<div className="flex flex-col items-start gap-0.5">
6969
<div className="flex items-center gap-2">
7070
<h3 className="font-semibold text-2xl capitalize tracking-tight">
71-
{validPlan === "growth_legacy"
72-
? "Growth"
73-
: validPlan === "starter_legacy"
74-
? "Starter"
75-
: validPlan}{" "}
76-
Plan
71+
{validPlan === "growth_legacy" ? "Growth" : validPlan} Plan
7772
</h3>
7873
{validPlan.includes("legacy") && (
7974
<Badge variant="warning">Legacy</Badge>

apps/dashboard/src/app/(app)/team/[team_slug]/layout.tsx

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { getTeamBySlug } from "@/api/team";
2-
import { Button } from "@/components/ui/button";
3-
import { TrackedLinkTW } from "@/components/ui/tracked-link";
42
import { PosthogIdentifierServer } from "components/wallets/PosthogIdentifierServer";
5-
import { ArrowRightIcon } from "lucide-react";
63
import { redirect } from "next/navigation";
74
import { Suspense } from "react";
85
import { getAuthToken } from "../../api/lib/getAuthToken";
@@ -50,10 +47,6 @@ export default async function RootTeamLayout(props: {
5047
return <PastDueBanner teamSlug={team_slug} />;
5148
}
5249

53-
if (team.billingPlan === "starter_legacy") {
54-
return <StarterLegacyDiscontinuedBanner teamSlug={team_slug} />;
55-
}
56-
5750
return null;
5851
})()}
5952

@@ -71,33 +64,3 @@ export default async function RootTeamLayout(props: {
7164
</div>
7265
);
7366
}
74-
75-
function StarterLegacyDiscontinuedBanner(props: {
76-
teamSlug: string;
77-
}) {
78-
return (
79-
<div className="border-red-600 border-b bg-red-50 px-4 py-6 text-red-800 dark:border-red-700 dark:bg-red-950 dark:text-red-100">
80-
<div className="text-center">
81-
<p>Starter legacy plans are being discontinued on May 31, 2025</p>
82-
<p>
83-
To prevent service interruptions and losing access to your current
84-
features select a new plan
85-
</p>
86-
<Button
87-
asChild
88-
size="sm"
89-
className="mt-3 gap-2 border border-red-600 bg-red-100 text-red-800 hover:bg-red-200 dark:border-red-700 dark:bg-red-900 dark:text-red-100 dark:hover:bg-red-800"
90-
>
91-
<TrackedLinkTW
92-
href={`/team/${props.teamSlug}/~/settings/billing?showPlans=true`}
93-
category="billingBanner"
94-
label="starterLegacy_selectPlan"
95-
>
96-
Select a new plan
97-
<ArrowRightIcon className="size-4" />
98-
</TrackedLinkTW>
99-
</Button>
100-
</div>
101-
</div>
102-
);
103-
}

apps/dashboard/src/app/(app)/team/components/TeamHeader/TeamHeaderUI.stories.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ function Variants(props: {
4949
(t) => t.team.billingPlan === "starter",
5050
);
5151

52-
const starterLegacyTeam = teamsAndProjectsStub.find(
53-
(t) => t.team.billingPlan === "starter_legacy",
54-
);
55-
5652
const growthTeam = teamsAndProjectsStub.find(
5753
(t) => t.team.billingPlan === "growth",
5854
);
@@ -80,8 +76,7 @@ function Variants(props: {
8076
!growthLegacyTeam ||
8177
!accelerateTeam ||
8278
!scaleTeam ||
83-
!proTeam ||
84-
!starterLegacyTeam
79+
!proTeam
8580
) {
8681
return <div> invalid storybook stubs </div>;
8782
}
@@ -97,10 +92,6 @@ function Variants(props: {
9792
<Variant team={starterTeam.team} type={props.type} />
9893
</BadgeContainer>
9994

100-
<BadgeContainer label="Legacy Starter Plan">
101-
<Variant team={starterLegacyTeam.team} type={props.type} />
102-
</BadgeContainer>
103-
10495
<BadgeContainer label="Growth Plan">
10596
<Variant team={growthTeam.team} type={props.type} />
10697
</BadgeContainer>

apps/dashboard/src/components/onboarding/ApplyForOpCreditsModal.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,7 @@ export const PlanToCreditsRecord: Record<Team["billingPlan"], CreditsRecord> = {
5151
plan: "starter",
5252
...tier1Credits,
5353
},
54-
starter_legacy: {
55-
plan: "starter_legacy",
56-
...tier1Credits,
57-
},
54+
5855
growth: {
5956
plan: "growth",
6057
...tier1Credits,

apps/dashboard/src/components/settings/Account/Billing/GatedSwitch.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ function Variants() {
3333

3434
const plans: Team["billingPlan"][] = [
3535
"free",
36-
"starter_legacy",
3736
"starter",
3837
"growth_legacy",
3938
"growth",

apps/dashboard/src/components/settings/Account/Billing/Pricing.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { PRO_CONTACT_US_URL } from "../../../../constants/pro";
1313
// this is used to determine whether to show "Upgrade" or "Downgrade" label based on tier level
1414
const planToTierRecord: Record<Team["billingPlan"], number> = {
1515
free: 0,
16-
starter_legacy: 1,
1716
starter: 2,
1817
growth_legacy: 3,
1918
growth: 4,
@@ -71,11 +70,7 @@ export const BillingPricing: React.FC<BillingPricingProps> = ({
7170
validTeamPlan === "starter" ||
7271
validTeamPlan === "growth_legacy"));
7372

74-
const highlightStarterPlan =
75-
highlightPlan === "starter" ||
76-
(!highlightPlan &&
77-
!isCurrentPlanScheduledToCancel &&
78-
validTeamPlan === "starter_legacy");
73+
const highlightStarterPlan = highlightPlan === "starter";
7974
const highlightScalePlan =
8075
highlightPlan === "scale" ||
8176
(!highlightPlan &&

apps/dashboard/src/components/settings/Account/Billing/planToTierRecord.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type { Team } from "@/api/team";
44
export const planToTierRecordForGating: Record<Team["billingPlan"], number> = {
55
free: 0,
66
starter: 1,
7-
starter_legacy: 2,
87
growth: 3,
98
accelerate: 4,
109
growth_legacy: 5,

apps/dashboard/src/stories/stubs.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ export const teamsAndProjectsStub: Array<{ team: Team; projects: Project[] }> =
132132
team: teamStub("2", "starter"),
133133
projects: [projectStub("t2p1", "team-2"), projectStub("t2p2", "team-2")],
134134
},
135-
{
136-
team: teamStub("3", "starter_legacy"),
137-
projects: [projectStub("t3p1", "team-3"), projectStub("t2p2", "team-2")],
138-
},
139135
{
140136
team: teamStub("3", "growth"),
141137
projects: [projectStub("t3p1", "team-3"), projectStub("t2p2", "team-2")],

apps/dashboard/src/utils/pricing.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Team } from "@/api/team";
33
type SelectivePlans = Exclude<
44
Team["billingPlan"],
55
// we will never show cards for these plans - so exclude it
6-
"accelerate" | "growth_legacy" | "free" | "starter_legacy"
6+
"accelerate" | "growth_legacy" | "free"
77
>;
88

99
export const TEAM_PLANS: Record<

packages/service-utils/src/core/api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ type TeamCapabilities = {
105105
type TeamPlan =
106106
| "free"
107107
| "starter"
108-
| "starter_legacy"
109108
| "growth_legacy"
110109
| "growth"
111110
| "accelerate"

0 commit comments

Comments
 (0)