mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: use live panel traffic data in admin subscription card
Subscription card showed stale traffic from local DB (0.0 GB) while the live traffic section below showed correct data from panel (3.52 GB). Now uses panelInfo.used_traffic_bytes when available, with DB fallback.
This commit is contained in:
@@ -1387,8 +1387,10 @@ export default function AdminUserDetail() {
|
||||
{t('admin.users.detail.subscription.traffic')}
|
||||
</div>
|
||||
<div className="text-dark-100">
|
||||
{user.subscription.traffic_used_gb.toFixed(1)} /{' '}
|
||||
{user.subscription.traffic_limit_gb} {t('common.units.gb')}
|
||||
{panelInfo?.found
|
||||
? (panelInfo.used_traffic_bytes / (1024 * 1024 * 1024)).toFixed(1)
|
||||
: user.subscription.traffic_used_gb.toFixed(1)}{' '}
|
||||
/ {user.subscription.traffic_limit_gb} {t('common.units.gb')}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user