Skip to content

Commit f9be760

Browse files
committed
fix: monthly pricing
1 parent 58c5f92 commit f9be760

File tree

3 files changed

+43
-9
lines changed

3 files changed

+43
-9
lines changed

apps/dashboard/components/autumn/pricing-table.tsx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,11 +372,29 @@ export const PricingCard = ({
372372
<div className="mb-2">
373373
<h3 className="mb-4 flex h-16 items-center border-y bg-secondary/40 px-6 font-semibold">
374374
<div className="line-clamp-2">
375-
{mainPriceDisplay?.primary_text}{' '}
376-
{mainPriceDisplay?.secondary_text && (
377-
<span className="mt-1 font-normal text-muted-foreground">
378-
{mainPriceDisplay?.secondary_text}
379-
</span>
375+
{product.id === 'hobby' ? (
376+
<div className="flex flex-col gap-1">
377+
<div className="flex items-center gap-2">
378+
<span className="text-muted-foreground text-xs line-through">
379+
$10.00
380+
</span>
381+
<span className="font-medium text-green-600">
382+
$2.00
383+
</span>
384+
</div>
385+
<span className="font-medium text-green-600 text-xs">
386+
Limited time!
387+
</span>
388+
</div>
389+
) : (
390+
<>
391+
{mainPriceDisplay?.primary_text}{' '}
392+
{mainPriceDisplay?.secondary_text && (
393+
<span className="mt-1 font-normal text-muted-foreground">
394+
{mainPriceDisplay?.secondary_text}
395+
</span>
396+
)}
397+
</>
380398
)}
381399
</div>
382400
</h3>

apps/docs/app/(home)/pricing/_pricing/table.tsx

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,25 @@ export function PlansComparisonTable({ plans }: Props) {
4242
className={`px-4 py-3 text-center text-foreground sm:px-5 lg:px-6 ${p.id === 'pro' ? 'border-border border-x bg-primary/10' : ''}`}
4343
key={`price-${p.id}`}
4444
>
45-
{p.priceMonthly === 0
46-
? 'Free'
47-
: `$${p.priceMonthly.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`}
45+
{p.priceMonthly === 0 ? (
46+
'Free'
47+
) : p.id === 'hobby' ? (
48+
<div className="flex flex-col items-center gap-1">
49+
<div className="flex items-center gap-2">
50+
<span className="text-muted-foreground text-xs line-through">
51+
$10.00
52+
</span>
53+
<span className="font-medium text-green-600">
54+
$2.00
55+
</span>
56+
</div>
57+
<span className="font-medium text-green-600 text-xs">
58+
Limited time!
59+
</span>
60+
</div>
61+
) : (
62+
`$${p.priceMonthly.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`
63+
)}
4864
</td>
4965
))}
5066
</tr>

apps/docs/app/(home)/pricing/data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const RAW_PLANS: RawPlan[] = [
9191
{
9292
type: 'price',
9393
interval: 'month',
94-
price: 1.99,
94+
price: 9.99,
9595
feature_id: null,
9696
feature: null,
9797
},

0 commit comments

Comments
 (0)