Skip to content

Commit 8c8f830

Browse files
atrakhConvex, Inc.
authored andcommitted
dashboard: use plan name map for upgrade plan content (#38281)
GitOrigin-RevId: 98c326de07bcf888250e985ce0ee44852ceebe7e
1 parent 5c66074 commit 8c8f830

File tree

1 file changed

+6
-1
lines changed
  • npm-packages/dashboard/src/pages/t/[team]/settings

1 file changed

+6
-1
lines changed

npm-packages/dashboard/src/pages/t/[team]/settings/billing.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { UpgradePlanContentContainer } from "components/billing/UpgradePlanConte
1818
import { useProfile } from "api/profile";
1919
import { ChevronLeftIcon } from "@radix-ui/react-icons";
2020
import { Loading } from "@ui/Loading";
21+
import { planNameMap } from "components/billing/planCards/PlanCard";
2122

2223
export { getServerSideProps } from "lib/ssr";
2324

@@ -37,6 +38,10 @@ function Billing({ team }: { team: Team }) {
3738
: p.id === router.query.upgradePlan,
3839
);
3940

41+
const newPlanName = selectedPlan?.planType
42+
? planNameMap[selectedPlan.planType] || selectedPlan.name
43+
: selectedPlan?.name;
44+
4045
const showUpgrade =
4146
selectedPlan && orbSub?.plan.id !== selectedPlan.id && hasAdminPermissions;
4247

@@ -128,7 +133,7 @@ function Billing({ team }: { team: Team }) {
128133
>
129134
{showUpgrade && selectedPlan && (
130135
<Sheet className="max-h-full overflow-y-auto scrollbar">
131-
<h3 className="mb-4">Upgrade to {selectedPlan.name}</h3>
136+
<h3 className="mb-4">Upgrade to {newPlanName}</h3>
132137
<UpgradePlanContentContainer
133138
name={myProfile?.name}
134139
email={myProfile?.email}

0 commit comments

Comments
 (0)