fixed broken elements due to api changes
This commit is contained in:
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user