Convert parseStats to typescript

This commit is contained in:
maxswa
2019-06-13 17:08:58 -04:00
parent 2b444f1631
commit a7cbafa582
4 changed files with 241 additions and 0 deletions

5
src/utils/helpers.ts Normal file
View File

@@ -0,0 +1,5 @@
import { Gamemode } from '../types';
import { BASE_URL, GAMEMODE_URL, STATS_URL } from './constants';
export const getStatsURL = (gamemode: Gamemode, rsn: string) =>
`${BASE_URL}${GAMEMODE_URL[gamemode]}${STATS_URL}${encodeURIComponent(rsn)}`;