mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 10:27:49 +00:00
fix: support 100% discount display + fix Telegram link widget race condition
- formatPrice shows "Бесплатно/Free" when price is 0 (SubscriptionPurchase, Subscription, RenewSubscription) - Add subscription.free locale key (ru/en/zh/fa) - Fix TelegramLinkWidget NS_BINDING_ABORTED: move legacy widget callback to ref pattern, remove unstable deps (showToast, t, navigate) from useEffect — prevents iframe destruction on re-render - Clean up OIDC effect deps
This commit is contained in:
@@ -183,7 +183,10 @@ export default function Subscription() {
|
||||
const destructiveConfirm = useDestructiveConfirm();
|
||||
|
||||
// Helper to format price from kopeks
|
||||
const formatPrice = (kopeks: number) => `${formatAmount(kopeks / 100)} ${currencySymbol}`;
|
||||
const formatPrice = (kopeks: number) =>
|
||||
kopeks === 0
|
||||
? t('subscription.free', 'Бесплатно')
|
||||
: `${formatAmount(kopeks / 100)} ${currencySymbol}`;
|
||||
|
||||
// Device/traffic topup state
|
||||
const [showDeviceTopup, setShowDeviceTopup] = useState(false);
|
||||
|
||||
Reference in New Issue
Block a user