fixed broken elements due to api changes

This commit is contained in:
cnachtigall1991
2021-10-17 19:52:12 +02:00
parent 123f78cb21
commit 6310295795
10 changed files with 228 additions and 69 deletions

View File

@@ -48,9 +48,12 @@ export const getPlayerArr = (stats, team, color) => {
export const constructAvatarUrl = (hash, size) => {
const base = 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars'
const imgSize = size ? `_${size}` : ''
const hashDir = hash.substring(0, 2)
return `${base}/${hashDir}/${hash}${imgSize}.jpg`
if (hash) {
const hashDir = hash.substring(0, 2)
return `${base}/${hashDir}/${hash}${imgSize}.jpg`
}
}
export const GetAvgRank = (stats) => {