fix(subscription): hide strikethrough free label on device addon price

The per-device price line in the buy-devices modal showed a
strikethrough 'Бесплатно' for users with a promo-group discount,
because original_price_per_device_kopeks was missing in the API
response and formatPrice(0) renders 'Бесплатно'. Now the
strikethrough is rendered only when original_price_per_device_kopeks
is present and non-zero, mirroring the existing guard on the total
price block.
This commit is contained in:
Fringg
2026-05-10 09:59:57 +03:00
parent 206926a3a3
commit 1fdafbd0a1

View File

@@ -1576,10 +1576,11 @@ export default function Subscription() {
<div className="mb-2 text-sm text-dark-400">
{/* Show original price with strikethrough if discount */}
{devicePriceData.discount_percent &&
devicePriceData.discount_percent > 0 ? (
devicePriceData.discount_percent > 0 &&
devicePriceData.original_price_per_device_kopeks ? (
<span>
<span className="text-dark-500 line-through">
{formatPrice(devicePriceData.original_price_per_device_kopeks || 0)}
{formatPrice(devicePriceData.original_price_per_device_kopeks)}
</span>
<span className="mx-1">{devicePriceData.price_per_device_label}</span>
</span>