From 1fdafbd0a1a5dbfc34b2ea9044d248487278a335 Mon Sep 17 00:00:00 2001 From: Fringg Date: Sun, 10 May 2026 09:59:57 +0300 Subject: [PATCH] fix(subscription): hide strikethrough free label on device addon price MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/pages/Subscription.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/Subscription.tsx b/src/pages/Subscription.tsx index 9fafe73..4e367cf 100644 --- a/src/pages/Subscription.tsx +++ b/src/pages/Subscription.tsx @@ -1576,10 +1576,11 @@ export default function Subscription() {
{/* Show original price with strikethrough if discount */} {devicePriceData.discount_percent && - devicePriceData.discount_percent > 0 ? ( + devicePriceData.discount_percent > 0 && + devicePriceData.original_price_per_device_kopeks ? ( - {formatPrice(devicePriceData.original_price_per_device_kopeks || 0)} + {formatPrice(devicePriceData.original_price_per_device_kopeks)} {devicePriceData.price_per_device_label}