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>
|
||||
</div>
|
||||
<p className={styles.originalPrice}>
|
||||
{plan.originalPrice ? `${plan.currencySymbol}${plan.originalPrice}` : "\u00a0"}
|
||||
{plan.originalPrice ?? "\u00a0"}
|
||||
</p>
|
||||
<div className={styles.perDayBar} style={perDayStyle}>
|
||||
{plan.perDay}
|
||||
|
||||
@@ -42,7 +42,7 @@ function currencySymbol(currency: string): string {
|
||||
|
||||
function formatAmount(amountCents: number | null): string | null {
|
||||
if (amountCents === null) return null;
|
||||
return (amountCents / 100).toFixed(2).replace(/\.00$/, "");
|
||||
return (amountCents / 100).toFixed(2).replace(/0$/, "");
|
||||
}
|
||||
|
||||
function planCaption(
|
||||
|
||||
Reference in New Issue
Block a user