99 Users ,
1010 CreditCard ,
1111 Star ,
12+ Megaphone ,
1213} from 'lucide-react'
1314import React from 'react'
1415
@@ -31,7 +32,7 @@ interface UsageDisplayProps {
3132 isLoading ?: boolean
3233}
3334
34- type FilteredGrantType = Exclude < GrantType , 'organization' | 'ad' >
35+ type FilteredGrantType = Exclude < GrantType , 'organization' >
3536
3637const grantTypeInfo : Record <
3738 FilteredGrantType ,
@@ -76,6 +77,14 @@ const grantTypeInfo: Record<
7677 label : 'Special Grant' ,
7778 description : 'Special credits from Codebuff' ,
7879 } ,
80+ ad : {
81+ bg : 'bg-purple-500' ,
82+ text : 'text-purple-600 dark:text-purple-400' ,
83+ gradient : 'from-purple-500/70 to-purple-600/70' ,
84+ icon : < Megaphone className = "h-4 w-4" /> ,
85+ label : 'Ad Credits' ,
86+ description : 'Earned from viewing ads' ,
87+ } ,
7988}
8089
8190interface CreditLeafProps {
@@ -227,6 +236,7 @@ export const UsageDisplay = ({
227236 referral : 0 ,
228237 purchase : 0 ,
229238 admin : 0 ,
239+ ad : 0 ,
230240 }
231241
232242 Object . entries ( GRANT_PRIORITIES ) . forEach ( ( [ type ] ) => {
@@ -243,7 +253,7 @@ export const UsageDisplay = ({
243253
244254 // Group credits by expiration type (excluding organization)
245255 const expiringTypes : FilteredGrantType [ ] = [ 'free' , 'referral' ]
246- const nonExpiringTypes : FilteredGrantType [ ] = [ 'admin' , 'purchase' ]
256+ const nonExpiringTypes : FilteredGrantType [ ] = [ 'admin' , 'purchase' , 'ad' ]
247257
248258 const expiringTotal = expiringTypes . reduce (
249259 ( acc , type ) => acc + ( principals ?. [ type ] || breakdown [ type ] || 0 ) ,
0 commit comments