Skip to content

Commit 4cb49db

Browse files
committed
update pricing + stripe
1 parent 8b09c14 commit 4cb49db

File tree

5 files changed

+42
-61
lines changed

5 files changed

+42
-61
lines changed

apps/web/pages/api/plans/index.ts

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,48 @@ const stripe = new Stripe(process.env.STRIPE_API_KEY!, {
1111
function getMembersCount({ price }: { price: string }): string {
1212
if (price === '150' || price === '1500') {
1313
return '5,000';
14-
} else if (price === '200' || price === '2000') {
15-
return '10,000';
1614
} else if (price === '250' || price === '2500') {
17-
return '15,000';
18-
} else if (price === '300' || price === '3000') {
1915
return '20,000';
16+
} else if (price === '400' || price === '4000') {
17+
return 'Unlimited';
2018
}
21-
return 'Unlimited';
19+
return '5,000';
20+
}
21+
22+
function extraFeatures({ price }: { price: string }): string[] {
23+
if (price === '150' || price === '1500') {
24+
return ['Community Support'];
25+
} else if (price === '250' || price === '2500') {
26+
return ['Priority Support'];
27+
} else if (price === '400' || price === '4000') {
28+
return [
29+
'24-hour support response time',
30+
'Optional: Your company featured on the Linen.dev website and GitHub readme',
31+
'Prioritized feature requests',
32+
];
33+
}
34+
return [];
2235
}
2336

2437
function serializeProduct(product: any) {
2538
const { id, name, description, metadata, default_price } = product;
26-
const { price, currency, period } = metadata;
39+
const { price, period } = metadata;
2740
return {
2841
id,
2942
name,
3043
description,
3144
price,
3245
priceId: default_price,
33-
currency,
3446
period,
3547
features: [
3648
`Up to ${getMembersCount({ price })} members`,
49+
'Google Indexable',
50+
'Unlimited history retention',
51+
'Branded community',
3752
'Custom domain',
38-
'Custom branding',
39-
'SEO benefits',
40-
'Private communities',
41-
'Analytics',
42-
'Priority Support',
53+
'Sitemap generation',
54+
'Import Slack and Discord conversations',
55+
...extraFeatures({ price }),
4356
],
4457
};
4558
}
@@ -95,7 +108,7 @@ export async function create({
95108
},
96109
],
97110
subscription_data: {
98-
trial_period_days: 7,
111+
trial_period_days: 14,
99112
},
100113
metadata: {
101114
communityId,

apps/web/pages/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const tiers = [
2626
'Google Indexable',
2727
'Unlimited history retention',
2828
'Branded community',
29-
'Priority Support',
29+
'Community Support',
3030
'Custom domain',
3131
'Sitemap generation',
3232
'Import Slack and Discord conversations',
@@ -62,10 +62,11 @@ const tiers = [
6262
'Google Indexable',
6363
'Unlimited history retention',
6464
'Branded community',
65-
'Priority Support',
65+
'24-hour support response time',
6666
'Custom domain',
6767
'Sitemap generation',
6868
'Import Slack and Discord conversations',
69+
'Optional: Your company featured on the Linen.dev website and GitHub readme',
6970
],
7071
mostPopular: false,
7172
},
@@ -334,6 +335,9 @@ const Home = (props: { accounts: Props[] }) => {
334335
/month
335336
</span>
336337
</p>
338+
<p className="text-sm leading-6 text-gray-600 italic ">
339+
2 months off when billed yearly
340+
</p>
337341
<p className="mt-4 text-sm leading-6 text-gray-600">
338342
{tier.description}
339343
</p>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.tbody > :not([hidden]) ~ :not([hidden]) {
22
border-top-width: 1px;
33
border-bottom-width: 1px;
4-
background-color: var(--color-white);
4+
background-color: var(--color-background);
55
border-color: var(--color-gray-200);
66
}

apps/web/ui/Tiers/index.module.scss

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,29 @@
4646

4747
.list svg {
4848
color: var(--color-primary);
49+
min-width: 32px;
4950
}
5051

5152
.grid {
5253
display: grid;
5354
grid-template-columns: repeat(1, minmax(0, 1fr));
5455
gap: 1rem;
55-
padding: 0 1rem;
56+
padding: 1rem;
5657
max-width: 1440px;
5758
}
5859

5960
@media (min-width: 768px) {
6061
.grid {
61-
grid-template-columns: repeat(2, minmax(0, 1fr));
62+
grid-template-columns: repeat(1, minmax(0, 1fr));
6263
gap: 2rem;
63-
padding: 0 2rem;
64+
padding: 2rem;
6465
}
6566
}
6667

6768
@media (min-width: 1280px) {
6869
.grid {
69-
grid-template-columns: repeat(4, minmax(0, 1fr));
70+
grid-template-columns: repeat(3, minmax(0, 1fr));
7071
gap: 2rem;
71-
padding: 0 2rem;
72+
padding: 2rem;
7273
}
7374
}

apps/web/ui/Tiers/index.tsx

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import { useState } from 'react';
22
import classNames from 'classnames';
33
import { SerializedAccount, Period } from '@linen/types';
44
import { FiCheck } from '@react-icons/all-files/fi/FiCheck';
@@ -24,21 +24,6 @@ interface Props {
2424
currentCommunity: SerializedAccount;
2525
}
2626

27-
const ENTERPRISE_PLAN = {
28-
name: 'Community',
29-
description: 'Dedicated support and infrastructure for your community.',
30-
features: [
31-
'Unlimited members',
32-
'Custom domain',
33-
'Custom branding',
34-
'SEO benefits',
35-
'Private communities',
36-
'Analytics',
37-
'Priority Support',
38-
],
39-
price: 'Custom',
40-
};
41-
4227
export default function Tiers({
4328
currentCommunity,
4429
tiers,
@@ -48,7 +33,7 @@ export default function Tiers({
4833
return (
4934
<div className={styles.grid}>
5035
{tiers.map((tier) => {
51-
const active = tier.name === 'Vici';
36+
const active = false; // tier.name === 'Vici';
5237

5338
const onSubmit = (event: any) => {
5439
event.preventDefault();
@@ -100,36 +85,14 @@ export default function Tiers({
10085
{tier.features.map((feature) => (
10186
<li key={feature}>
10287
<FiCheck />
103-
{feature}
88+
<span>{feature}</span>
10489
</li>
10590
))}
10691
</ul>
10792
</div>
10893
</Card>
10994
);
11095
})}
111-
<Card
112-
title={ENTERPRISE_PLAN.name}
113-
description={ENTERPRISE_PLAN.description}
114-
price="Custom"
115-
>
116-
<a
117-
href="mailto:[email protected]?subject=Linen Enterprise"
118-
className={styles.button}
119-
>
120-
Contact us
121-
</a>
122-
<div>
123-
<ul className={styles.list}>
124-
{ENTERPRISE_PLAN.features.map((feature) => (
125-
<li key={feature}>
126-
<FiCheck />
127-
{feature}
128-
</li>
129-
))}
130-
</ul>
131-
</div>
132-
</Card>
13396
</div>
13497
);
13598
}

0 commit comments

Comments
 (0)