mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: hide legacy subscription card on Dashboard in multi-tariff mode
This commit is contained in:
@@ -292,37 +292,41 @@ export default function Dashboard() {
|
|||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Subscription Status Card */}
|
{/* Subscription Status Card — hidden in multi-tariff (managed via /subscriptions) */}
|
||||||
{subLoading ? (
|
{!isMultiTariff && (
|
||||||
<div className="bento-card">
|
<>
|
||||||
<div className="mb-4 flex items-center justify-between">
|
{subLoading ? (
|
||||||
<div className="skeleton h-5 w-20" />
|
<div className="bento-card">
|
||||||
<div className="skeleton h-6 w-16 rounded-full" />
|
<div className="mb-4 flex items-center justify-between">
|
||||||
</div>
|
<div className="skeleton h-5 w-20" />
|
||||||
<div className="skeleton mb-3 h-10 w-32" />
|
<div className="skeleton h-6 w-16 rounded-full" />
|
||||||
<div className="skeleton mb-3 h-4 w-40" />
|
</div>
|
||||||
<div className="skeleton h-3 w-full rounded-full" />
|
<div className="skeleton mb-3 h-10 w-32" />
|
||||||
<div className="mt-5">
|
<div className="skeleton mb-3 h-4 w-40" />
|
||||||
<div className="skeleton h-12 w-full rounded-xl" />
|
<div className="skeleton h-3 w-full rounded-full" />
|
||||||
</div>
|
<div className="mt-5">
|
||||||
</div>
|
<div className="skeleton h-12 w-full rounded-xl" />
|
||||||
) : subscription?.is_expired ||
|
</div>
|
||||||
subscription?.status === 'disabled' ||
|
</div>
|
||||||
subscription?.is_limited ? (
|
) : subscription?.is_expired ||
|
||||||
<SubscriptionCardExpired
|
subscription?.status === 'disabled' ||
|
||||||
subscription={subscription}
|
subscription?.is_limited ? (
|
||||||
balanceKopeks={balanceData?.balance_kopeks ?? 0}
|
<SubscriptionCardExpired
|
||||||
balanceRubles={balanceData?.balance_rubles ?? 0}
|
subscription={subscription}
|
||||||
/>
|
balanceKopeks={balanceData?.balance_kopeks ?? 0}
|
||||||
) : subscription ? (
|
balanceRubles={balanceData?.balance_rubles ?? 0}
|
||||||
<SubscriptionCardActive
|
/>
|
||||||
subscription={subscription}
|
) : subscription ? (
|
||||||
trafficData={trafficData}
|
<SubscriptionCardActive
|
||||||
refreshTrafficMutation={refreshTrafficMutation}
|
subscription={subscription}
|
||||||
trafficRefreshCooldown={trafficRefreshCooldown}
|
trafficData={trafficData}
|
||||||
connectedDevices={devicesData?.total ?? 0}
|
refreshTrafficMutation={refreshTrafficMutation}
|
||||||
/>
|
trafficRefreshCooldown={trafficRefreshCooldown}
|
||||||
) : null}
|
connectedDevices={devicesData?.total ?? 0}
|
||||||
|
/>
|
||||||
|
) : null}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Trial Activation */}
|
{/* Trial Activation */}
|
||||||
{hasNoSubscription && !trialLoading && trialInfo?.is_available && (
|
{hasNoSubscription && !trialLoading && trialInfo?.is_available && (
|
||||||
|
|||||||
Reference in New Issue
Block a user