Skip to content

Commit

Permalink
Hide spectators in ping component
Browse files Browse the repository at this point in the history
  • Loading branch information
scottadkin committed Sep 25, 2024
1 parent dda4b62 commit 420ca6b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/app/UI/Match/Pings.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ export default function Pings({data, totalTeams}){
"max": {"title": "Max"},
};

const rows = data.map((d) =>{
return {
const rows = [];

for(let i = 0; i < data.length; i++){

const d = data[i];

if(d.spectator === 1) continue;

rows.push({
"name": {
"value": d.name.toLowerCase(),
"displayValue": <PlayerLink id={d.player_id} country={d.country}>{d.name}</PlayerLink>,
Expand All @@ -23,8 +30,8 @@ export default function Pings({data, totalTeams}){
"min": {"value": d.ping_min},
"avg": {"value": d.ping_avg},
"max": {"value": d.ping_max},
};
});
});
}

return <>
<Header>Ping Summary</Header>
Expand Down

0 comments on commit 420ca6b

Please sign in to comment.