mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
fix: platform-aware delete confirmation + trial CTA to purchase
Delete subscription: - Telegram mini app: native destructive popup (red button) - Web (mobile + desktop): Sheet bottom panel with full-width buttons - Both: proper loading state on delete button Trial CTA: leads to /subscription/purchase (trial cannot be renewed)
This commit is contained in:
@@ -38,9 +38,12 @@ export default function PurchaseCTAButton({
|
||||
? t('subscription.cta.renewHint', 'Продление подписки')
|
||||
: t('subscription.cta.activeHint');
|
||||
|
||||
// In multi-tariff mode: renew goes to per-subscription renew page
|
||||
const linkTo =
|
||||
isMultiTariff && subscription?.id
|
||||
// Trial → purchase page (buy a real tariff, trial can't be renewed)
|
||||
// Multi-tariff active → per-subscription renew page
|
||||
// Otherwise → purchase page
|
||||
const linkTo = isTrial
|
||||
? '/subscription/purchase'
|
||||
: isMultiTariff && subscription?.id
|
||||
? `/subscriptions/${subscription.id}/renew`
|
||||
: '/subscription/purchase';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user