do to formatters
This commit is contained in:
35
apps/website/lib/formatters/SeasonStatusFormatter.ts
Normal file
35
apps/website/lib/formatters/SeasonStatusFormatter.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* SeasonStatusDisplay
|
||||
*
|
||||
* Deterministic display logic for season status.
|
||||
*/
|
||||
|
||||
export interface SeasonStatusDisplayData {
|
||||
color: string;
|
||||
bg: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
export class SeasonStatusFormatter {
|
||||
private static readonly CONFIG: Record<string, SeasonStatusDisplayData> = {
|
||||
active: {
|
||||
color: 'text-performance-green',
|
||||
bg: 'bg-performance-green/10',
|
||||
label: 'Active Season'
|
||||
},
|
||||
upcoming: {
|
||||
color: 'text-warning-amber',
|
||||
bg: 'bg-warning-amber/10',
|
||||
label: 'Starting Soon'
|
||||
},
|
||||
completed: {
|
||||
color: 'text-gray-400',
|
||||
bg: 'bg-gray-400/10',
|
||||
label: 'Season Ended'
|
||||
},
|
||||
};
|
||||
|
||||
static getDisplay(status: 'active' | 'upcoming' | 'completed'): SeasonStatusDisplayData {
|
||||
return this.CONFIG[status];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user