File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
npm-packages/dashboard/src/components/billing Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -132,16 +132,21 @@ export function TeamUsage({ team }: { team: TeamResponse }) {
132132
133133 const hasOrbSubscription = useHasSubscription ( team ?. id ) ;
134134
135+ // Business plans don't have included usage, so treat them like there's no subscription
136+ const isBusinessPlan = subscription ?. plan . planType === "CONVEX_BUSINESS" ;
137+
135138 const hasSubscription =
136139 ( ! shownBillingPeriod ||
137140 shownBillingPeriod . type === "currentBillingPeriod" ) &&
138141 ( hasOrbSubscription || hasOrbSubscription === undefined ) &&
139- projectId === null ;
142+ projectId === null &&
143+ ! isBusinessPlan ;
140144
141145 const showEntitlements =
142146 ( ! shownBillingPeriod ||
143147 shownBillingPeriod . type === "currentBillingPeriod" ) &&
144- projectId === null ;
148+ projectId === null &&
149+ ! isBusinessPlan ;
145150
146151 return (
147152 < div className = "[--team-usage-toolbar-height:--spacing(32)] md:[--team-usage-toolbar-height:--spacing(28)] lg:[--team-usage-toolbar-height:--spacing(20)]" >
Original file line number Diff line number Diff line change @@ -44,8 +44,11 @@ export function OrbSelfServePlan({
4444 } ;
4545
4646 const isDowngrade =
47- orbSub ?. plan . planType === "CONVEX_PROFESSIONAL" &&
48- plan . planType === "CONVEX_STARTER_PLUS" ;
47+ ( orbSub ?. plan . planType === "CONVEX_PROFESSIONAL" &&
48+ plan . planType === "CONVEX_STARTER_PLUS" ) ||
49+ ( orbSub ?. plan . planType === "CONVEX_BUSINESS" &&
50+ ( plan . planType === "CONVEX_STARTER_PLUS" ||
51+ plan . planType === "CONVEX_PROFESSIONAL" ) ) ;
4952
5053 const changePlan = useChangeSubscription ( team . id ) ;
5154
You can’t perform that action at this time.
0 commit comments