do to formatters

This commit is contained in:
2026-01-24 01:07:43 +01:00
parent ae59df61eb
commit 891b3cf0ee
140 changed files with 656 additions and 1159 deletions

View File

@@ -0,0 +1,32 @@
export class MedalFormatter {
static getVariant(position: number): 'warning' | 'low' | 'high' {
switch (position) {
case 1: return 'warning';
case 2: return 'high';
case 3: return 'warning';
default: return 'low';
}
}
static getMedalIcon(position: number): string | null {
return position <= 3 ? '🏆' : null;
}
static getBg(position: number): string {
switch (position) {
case 1: return 'bg-warning-amber';
case 2: return 'bg-gray-300';
case 3: return 'bg-orange-700';
default: return 'bg-gray-800';
}
}
static getColor(position: number): string {
switch (position) {
case 1: return 'text-warning-amber';
case 2: return 'text-gray-300';
case 3: return 'text-orange-700';
default: return 'text-gray-400';
}
}
}