Skip to content

Commit

Permalink
Add kills/deaths stats
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-in-a-hat committed Sep 25, 2018
1 parent edec678 commit dda3a0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Stats.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,18 @@ var Stats = React.createClass({
<td></td>
<td></td>
<td>Wins</td>
<td>K</td>
<td>D</td>
</thead>
<tbody>
{_.map(stats, (playerStats, index) => {
return (
<tr key={index} className={playerStats.isAlive ? '' : 'player-dead'}>
<td>{playerStats.isAlive ? '' : "💀"}</td>
<td className='player-name'>{playerStats.name}</td>
<td className='stats-results'>{playerStats.wins}</td>
<td className='stats-results stats-wins'>{playerStats.wins}</td>
<td className='stats-results stats-kdr'>{playerStats.kills}</td>
<td className='stats-results stats-kdr'>{playerStats.deaths}</td>
</tr>
);
})}
Expand Down
3 changes: 3 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ b {
.stats-results {
text-align: right;
}
.stats-wins {
background-color: #313131;
}
.stats td {
padding: 0 .5em;
}
Expand Down

0 comments on commit dda3a0c

Please sign in to comment.