Skip to content

Commit e21fc78

Browse files
Updates account labeling for Student plan
1 parent 8495844 commit e21fc78

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/plus/gk/utils/subscription.utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ export function getSubscriptionProductPlanName(id: SubscriptionPlanIds): string
163163
export function getSubscriptionProductPlanNameFromState(
164164
state: SubscriptionState,
165165
planId?: SubscriptionPlanIds,
166-
_effectivePlanId?: SubscriptionPlanIds,
166+
effectivePlanId?: SubscriptionPlanIds,
167167
): string {
168168
switch (state) {
169169
case SubscriptionState.Community:
170170
case SubscriptionState.Trial:
171-
return `${getSubscriptionProductPlanName('pro')} Trial`;
171+
return `${effectivePlanId === 'student' ? getSubscriptionProductPlanName('student') : getSubscriptionProductPlanName('pro')} Trial`;
172172
// return `${getSubscriptionProductPlanName(
173173
// _effectivePlanId != null &&
174174
// compareSubscriptionPlans(_effectivePlanId, planId ?? 'pro') > 0

src/webviews/apps/plus/shared/components/account-chip.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export class GlAccountChip extends LitElement {
289289

290290
private get planTier() {
291291
if (isSubscriptionTrial(this.subscription)) {
292-
return 'Pro Trial';
292+
return this.subscription.plan.effective.id === 'student' ? 'Student' : 'Pro Trial';
293293
}
294294

295295
return getSubscriptionPlanName(this.planId);
@@ -507,8 +507,8 @@ export class GlAccountChip extends LitElement {
507507
<p>
508508
You have
509509
<strong>${days < 1 ? '<1 day' : pluralize('day', days, { infix: ' more ' })} left</strong>
510-
in your Pro trial. Once your trial ends, you will only be able to use Pro features on
511-
publicly-hosted repos.
510+
in your ${this.planTier === 'Student' ? 'Student' : 'Pro'} trial. Once your trial ends, you will
511+
only be able to use Pro features on publicly-hosted repos.
512512
</p>
513513
<button-container layout="editor">
514514
<gl-button

0 commit comments

Comments
 (0)