Skip to content

Commit e8051ed

Browse files
committed
[Pricing] Re-enable $99 lifetime plan
1 parent 83a9104 commit e8051ed

2 files changed

Lines changed: 27 additions & 21 deletions

File tree

landing/src/components/sections/pricing/PricingPlanBlock.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,17 @@ export function PricingPlanBlock(props: PricingPlanBlockProps) {
103103
footerText =
104104
(footerText ? `${footerText}\n` : footerText) +
105105
`Free for ${localizedPlan.trialPeriodDays} days`
106+
} else if (
107+
localizedPlan.amount &&
108+
activePlans.some(p => !p.amount && p.trialPeriodDays)
109+
) {
110+
//
111+
} else if (localizedPlan.trialPeriodDays) {
112+
footerText =
113+
(footerText ? `${footerText}\n` : footerText) +
114+
`${localizedPlan.trialPeriodDays}-day free trial`
115+
} else if (localizedPlan.amount && !localizedPlan.trialPeriodDays) {
116+
footerText = (footerText ? `${footerText}\n` : footerText) + 'No free trial'
106117
}
107118

108119
if (modifiedAmount !== localizedPlan.amount) {
@@ -119,17 +130,7 @@ export function PricingPlanBlock(props: PricingPlanBlockProps) {
119130
'One-time payment (no subscription)'
120131
}
121132

122-
if (
123-
!footerText &&
124-
localizedPlan.interval &&
125-
localizedPlan.amount &&
126-
totalNumberOfVisiblePlans === 1
127-
) {
128-
if (localizedPlan.trialPeriodDays) {
129-
footerText =
130-
(footerText ? `${footerText}\n` : footerText) +
131-
`${localizedPlan.trialPeriodDays}-day free trial`
132-
}
133+
if (!footerText && localizedPlan.interval && localizedPlan.amount) {
133134
footerText =
134135
(footerText ? `${footerText}\n` : footerText) +
135136
'Cancel anytime with one click'

packages/core/src/utils/plans.ts

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import { Plan } from '../types'
22
import * as constants from './constants'
33

4-
export type ActivePlanID = '5def28820f73d2a6fca95d45'
4+
export type ActivePlanID =
5+
| 'free'
6+
| '5def28820f73d2a6fca95d45'
7+
| '5dd82d16eb2b11106f941f8d'
58

69
export type InactivePlanID =
7-
| 'free'
810
| '5d4b8e85d123d1d770d93825'
911
| '5d4b8e44ab1ba20b9ef4a1ba'
1012
| '5d4b8e4de70bd8c61c13a6a9'
@@ -25,7 +27,6 @@ export type InactivePlanID =
2527
| '5de54fc30cd5acc31a86e884'
2628
| '5de552b6dde41be55811ed15'
2729
| '5dee983f450f010aa1c9ca10'
28-
| '5dd82d16eb2b11106f941f8d'
2930
| '5def259daae626775b89a2d0'
3031

3132
export type PlanID = ActivePlanID | InactivePlanID
@@ -629,7 +630,7 @@ export const allPlansObj: Record<PlanID, Plan> = {
629630
cannonicalId: 'lifetime-v1',
630631
label: 'Lifetime v1',
631632
description: `Lifetime access from v0.9 to v1.9 \n(current: v${constants.APP_VERSION})`,
632-
amount: 5900,
633+
amount: 9900,
633634
currency: 'usd',
634635
interval: undefined,
635636
intervalCount: 1,
@@ -749,7 +750,7 @@ export const allPlansObj: Record<PlanID, Plan> = {
749750
currency: 'usd',
750751
interval: 'month',
751752
intervalCount: 6,
752-
trialPeriodDays: 14,
753+
trialPeriodDays: 0,
753754
featureLabels: [],
754755

755756
featureFlags: {
@@ -777,7 +778,7 @@ export const allPlansObj: Record<PlanID, Plan> = {
777778
currency: 'usd',
778779
interval: 'month',
779780
intervalCount: 6,
780-
trialPeriodDays: 14,
781+
trialPeriodDays: 0,
781782
featureLabels: [],
782783

783784
featureFlags: {
@@ -796,16 +797,16 @@ export const allPlansObj: Record<PlanID, Plan> = {
796797
stripeIds: ['plan_GKgKdyVaWtpiY1', 'plan_GKgMTwxlYpV0rr'],
797798
paddleProductId: undefined,
798799

799-
banner: false,
800+
banner: true,
800801

801802
cannonicalId: 'stripe-3mo',
802-
label: '',
803-
description: '',
803+
label: 'Pay as you go',
804+
description: '\n\n',
804805
amount: 2900,
805806
currency: 'usd',
806807
interval: 'month',
807808
intervalCount: 3,
808-
trialPeriodDays: 14,
809+
trialPeriodDays: 0,
809810
featureLabels: [],
810811

811812
featureFlags: {
@@ -821,9 +822,13 @@ export const allPlansObj: Record<PlanID, Plan> = {
821822
export const allPlans = Object.values(allPlansObj)
822823

823824
export const activePlans: Array<Plan & { id: ActivePlanID }> = [
825+
freeTrialPlan,
824826
allPlansObj['5def28820f73d2a6fca95d45'] as Plan & {
825827
id: ActivePlanID
826828
},
829+
allPlansObj['5dd82d16eb2b11106f941f8d'] as Plan & {
830+
id: ActivePlanID
831+
},
827832
]
828833

829834
export const activePaidPlans = activePlans.filter(plan => plan.amount > 0)

0 commit comments

Comments
 (0)