Skip to content

Commit 7059836

Browse files
committed
Add subscription grant type to usage-display for typecheck compatibility
1 parent 7f5e135 commit 7059836

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

web/src/app/profile/components/usage-display.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
CreditCard,
1111
Star,
1212
Megaphone,
13+
Zap,
1314
} from 'lucide-react'
1415
import React from 'react'
1516

@@ -85,6 +86,14 @@ const grantTypeInfo: Record<
8586
label: 'Ad Credits',
8687
description: 'Earned from viewing ads',
8788
},
89+
subscription: {
90+
bg: 'bg-teal-500',
91+
text: 'text-teal-600 dark:text-teal-400',
92+
gradient: 'from-teal-500/70 to-teal-600/70',
93+
icon: <Zap className="h-4 w-4" />,
94+
label: 'Subscription',
95+
description: 'Credits from your subscription',
96+
},
8897
}
8998

9099
interface CreditLeafProps {
@@ -234,6 +243,7 @@ export const UsageDisplay = ({
234243
const usedCredits: Record<FilteredGrantType, number> = {
235244
free: 0,
236245
referral: 0,
246+
subscription: 0,
237247
purchase: 0,
238248
admin: 0,
239249
ad: 0,
@@ -252,7 +262,7 @@ export const UsageDisplay = ({
252262
})
253263

254264
// Group credits by expiration type (excluding organization)
255-
const expiringTypes: FilteredGrantType[] = ['free', 'referral']
265+
const expiringTypes: FilteredGrantType[] = ['free', 'referral', 'subscription']
256266
const nonExpiringTypes: FilteredGrantType[] = ['admin', 'purchase', 'ad']
257267

258268
const expiringTotal = expiringTypes.reduce(

0 commit comments

Comments
 (0)