mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: add column
This commit is contained in:
1 parent
74a83d17e7
commit
82014845cb
3 files changed
+95
-12
No files matched your search
@@ -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}` : ''}`,
|
||||
)}`;
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user