feat: ratings stats

This commit is contained in:
TrèsAbhi committed 2024-03-20 20:40:01 -05:00
1 parent 5f28b541e3
commit ca3a1fbe3f
12 files changed
+117 -78

No files matched your search

+12 -1
View File
@@ -23,11 +23,22 @@ export interface AllStats {
dropped_capture_points: number;
}
export interface SupplementaryStats {
export interface SupplementaryStatsRandom {
type: 'random';
WN8?: number;
tier?: number;
}
export interface SupplementaryStatsRating {
type: 'rating';
score: number;
delta: number;
}
export type SupplementaryStats =
| SupplementaryStatsRandom
| SupplementaryStatsRating;
export interface ClanStats {
spotted: number;
max_frags_tank_id: number;
+5
View File
@@ -0,0 +1,5 @@
import { LEAGUES } from '../../constants/leagues';
export function getLeagueFromScore(score: number) {
return LEAGUES.find(({ minScore }) => score >= minScore)!;
}