fix(subscription): refine plan price display

This commit is contained in:
2026-06-24 17:11:37 +08:00
parent 07658071f2
commit bb99fa592b
2 changed files with 2 additions and 2 deletions
@@ -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(