reworked the sub-navigation on the Match-page

This commit is contained in:
cnachtigall1991
2021-10-15 11:11:38 +02:00
parent a29f4b1f2a
commit 3e9d8c47e3
11 changed files with 244 additions and 332 deletions

View File

@@ -31,13 +31,13 @@ export const checkStatEmpty = (stat) => {
return 0
}
export const getPlayerArr = (stats, team) => {
export const getPlayerArr = (stats, team, color) => {
let arr = []
for (let i = (team - 1) * 5; i < team * 5; i++) {
arr.push({
value: truncate(stats[i].player.name, 15),
value: truncate(stats[i].player.name, 12),
textStyle: {
color: 'white'
color: color ? getComputedStyle(document.documentElement).getPropertyValue(`--csgo-${stats[i].color}`) : 'white'
}
})
}