Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/lib/member-client-utils.ts |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/lib/member-client-utils.ts |
| Original SHA-256 | 5307ab9320b55a62c1d45876393d1a4ca2d9ff76123d4f64b3cdbfc047d8917a |
| Git blob SHA | 2a7bc192ff34434e5c85fa86a01f3112ef555d2b |
| Reading-copy SHA-256 | 5307ab9320b55a62c1d45876393d1a4ca2d9ff76123d4f64b3cdbfc047d8917a |
Recovered source transcript
Download complete source text ↓31 lines · 0.7 KB
/**
* Client-safe member utilities that don't depend on server-side modules
*/
export interface MemberBadge {
type: 'contributor' | 'community' | 'supporter'
label: string
variant: 'default' | 'secondary' | 'outline'
}
/**
* Synchronously determines member badge based on contribution status
* @param hasContributions - Whether the user has made contributions
* @returns MemberBadge configuration
*/
export function getMemberBadgeSync(hasContributions?: boolean): MemberBadge {
if (hasContributions) {
return {
type: 'contributor',
label: 'Contributor',
variant: 'default'
}
}
return {
type: 'community',
label: 'Community',
variant: 'secondary'
}
}