Skip to content

Commit b8d3f04

Browse files
committed
fix: fix pricing numbers
1 parent 2e939c3 commit b8d3f04

File tree

1 file changed

+34
-15
lines changed

1 file changed

+34
-15
lines changed

src/modules/pricing/components/PricingPlansList.tsx

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@ const PricingPlansList: FC<PricingPlansListProps> = ({ type }) => {
1616
const { data: pricingInfoList, isLoading: isPricingInfoListLoading } = useGetPricingInfo();
1717
const pricingList = isPricingInfoListLoading ? Array(4).fill(0) : pricingInfoList;
1818

19+
const pricingListDescriptions = [
20+
{
21+
id: 1,
22+
description: 'For casual degens',
23+
},
24+
{
25+
id: 2,
26+
description: 'For individuals',
27+
},
28+
{
29+
id: 3,
30+
description: 'For growing apps',
31+
},
32+
{
33+
id: 4,
34+
description: 'For advanced solutions',
35+
},
36+
];
37+
1938
return (
2039
<Box
2140
flexDirection={{ initial: 'row', ml: 'column' }}
@@ -93,7 +112,7 @@ const PricingPlansList: FC<PricingPlansListProps> = ({ type }) => {
93112
color="text-secondary"
94113
variant="bm-regular"
95114
>
96-
{/* {planItem?.planFor} */}
115+
{pricingListDescriptions?.find((desc) => desc.id === planItem?.id)?.description}
97116
</Text>
98117
</Box>
99118

@@ -103,36 +122,36 @@ const PricingPlansList: FC<PricingPlansListProps> = ({ type }) => {
103122
width="auto"
104123
gap="spacing-lg"
105124
>
106-
<Box
107-
css={
108-
planItem?.value > 0
109-
? css`
110-
margin: var(--spacing-none);
111-
`
112-
: css`
113-
margin: var(--spacing-none) var(--spacing-none) 20px var(--spacing-none);
114-
`
115-
}
116-
>
125+
<Box>
117126
<Text
118127
color="text-primary"
119128
variant="h2-semibold"
120129
>
121130
{planItem?.value >= 0
122131
? planItem?.value > 0
123-
? (type == 'monthly' ? planItem?.value : planItem?.value * 12)?.toLocaleString('en-US', {
132+
? (type == 'monthly' ? planItem?.value : planItem?.value * 0.85)?.toLocaleString('en-US', {
124133
style: 'currency',
125134
currency: 'USD',
126135
})
127136
: 'Free'
128137
: 'Talk to us!'}
129138
</Text>
139+
130140
{planItem?.value > 0 && (
131141
<Text
132142
color="text-tertiary"
133143
variant="bs-semibold"
134144
>
135-
per month billed yearly
145+
{(planItem.id == '2' || planItem.id == '3') && `per month`} {type == 'yearly' && `billed yearly`}
146+
</Text>
147+
)}
148+
149+
{planItem?.id == '4' && (
150+
<Text
151+
color="text-tertiary"
152+
variant="bs-semibold"
153+
>
154+
Custom pricing available
136155
</Text>
137156
)}
138157
</Box>
@@ -142,7 +161,7 @@ const PricingPlansList: FC<PricingPlansListProps> = ({ type }) => {
142161
block
143162
variant={planItem?.value === 0 ? 'outline' : planItem?.name === 'Pro' ? 'primary' : 'tertiary'}
144163
>
145-
Get Started
164+
{planItem.id == '4' ? `Contact Sales` : `Get Started`}
146165
</Button>
147166
</Link>
148167
</Box>

0 commit comments

Comments
 (0)