Fix toFixed error by converting string prices to numbers
This commit is contained in:
@@ -176,7 +176,7 @@ export default function CustomTokenCalculator({
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<div className="font-medium">€{pkg.total_price.toFixed(2)}</div>
|
||||
<div className="font-medium">€{Number(pkg.total_price).toFixed(2)}</div>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400">
|
||||
{pkg.discount_percentage}% off
|
||||
</div>
|
||||
|
||||
@@ -186,10 +186,10 @@ export default function TokenPurchaseFlow({
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<div className="font-bold text-lg text-gray-900 dark:text-white">
|
||||
€{pkg.total_price.toFixed(2)}
|
||||
€{Number(pkg.total_price).toFixed(2)}
|
||||
</div>
|
||||
<div className="text-sm text-gray-600 dark:text-gray-400">
|
||||
€{pkg.price_per_token.toFixed(2)} per token
|
||||
€{Number(pkg.price_per_token).toFixed(2)} per token
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user