fix(subscription): refine plan price display
This commit is contained in:
@@ -69,7 +69,7 @@ export function SubscriptionPlanCard({
|
|||||||
<span className={styles.price}>{plan.price}</span>
|
<span className={styles.price}>{plan.price}</span>
|
||||||
</div>
|
</div>
|
||||||
<p className={styles.originalPrice}>
|
<p className={styles.originalPrice}>
|
||||||
{plan.originalPrice ? `${plan.currencySymbol}${plan.originalPrice}` : "\u00a0"}
|
{plan.originalPrice ?? "\u00a0"}
|
||||||
</p>
|
</p>
|
||||||
<div className={styles.perDayBar} style={perDayStyle}>
|
<div className={styles.perDayBar} style={perDayStyle}>
|
||||||
{plan.perDay}
|
{plan.perDay}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ function currencySymbol(currency: string): string {
|
|||||||
|
|
||||||
function formatAmount(amountCents: number | null): string | null {
|
function formatAmount(amountCents: number | null): string | null {
|
||||||
if (amountCents === null) return null;
|
if (amountCents === null) return null;
|
||||||
return (amountCents / 100).toFixed(2).replace(/\.00$/, "");
|
return (amountCents / 100).toFixed(2).replace(/0$/, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
function planCaption(
|
function planCaption(
|
||||||
|
|||||||
Reference in New Issue
Block a user