feat(subscription): add support for wallet overflow and downgrade group functionality in subscription plans
This commit is contained in:
+4
-1
@@ -52,6 +52,7 @@ import {
|
||||
invalidateUserSubscription,
|
||||
deleteUserSubscription,
|
||||
} from '../../api'
|
||||
import { formatQuota } from '@/lib/format'
|
||||
import { formatTimestamp } from '../../lib'
|
||||
import type { PlanRecord, UserSubscriptionRecord } from '../../types'
|
||||
|
||||
@@ -301,7 +302,9 @@ export function UserSubscriptionsDialog(props: Props) {
|
||||
const sub = record.subscription
|
||||
const total = Number(sub.amount_total || 0)
|
||||
const used = Number(sub.amount_used || 0)
|
||||
return total > 0 ? `${used}/${total}` : t('Unlimited')
|
||||
return total > 0
|
||||
? `${formatQuota(used)}/${formatQuota(total)}`
|
||||
: t('Unlimited')
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user