feat: add column

This commit is contained in:
TrèsAbhi committed 2024-05-03 09:02:06 -05:00
1 parent 74a83d17e7
commit 82014845cb
3 files changed
+95 -12

No files matched your search

+3 -1
View File
@@ -2,7 +2,9 @@ import { Region } from '../../constants/regions';
import { WARGAMING_APPLICATION_ID } from '../../constants/wargamingApplicationID';
export function authURL(region: Region, callback?: string) {
if (typeof window === 'undefined') throw new Error('window is undefined');
return `https://api.worldoftanks.${region}/wot/auth/login/?application_id=${WARGAMING_APPLICATION_ID}&redirect_uri=${encodeURIComponent(
`${location.origin}/callback/wargaming/${callback ? `?return=${location.href}` : ''}`,
`${window.location.origin}/callback/wargaming/${callback ? `?return=${location.href}` : ''}`,
)}`;
}
+3 -1
View File
@@ -8,10 +8,12 @@ export const STAT_NAMES: Record<Stat, string> = {
winrate: 'Winrate',
wn8: 'WN8',
averageDamage: 'Damage',
damage: 'Damage',
damage: 'Accumulated damage',
wins: 'Wins',
};
export const STAT_KEYS = Object.keys(STAT_NAMES) as Stat[];
export function generateStats(s: AllStats, e?: AllStats) {
return {
battles: s.battles,