mirror of
https://github.com/lexogrine/cs2-react-hud.git
synced 2025-12-10 03:52:48 +01:00
26 lines
640 B
TypeScript
26 lines
640 B
TypeScript
import React from 'react';
|
|
import Player from './Player'
|
|
import * as I from 'csgogsi-socket';
|
|
import './players.scss';
|
|
|
|
interface Props {
|
|
players: I.Player[],
|
|
team: I.Team,
|
|
side: 'right' | 'left',
|
|
current: I.Player | null,
|
|
}
|
|
|
|
export default class TeamBox extends React.Component<Props> {
|
|
render() {
|
|
return (
|
|
<div className={`teambox ${this.props.team.side} ${this.props.side}`}>
|
|
{this.props.players.map(player => <Player
|
|
key={player.steamid}
|
|
player={player}
|
|
isObserved={!!(this.props.current && this.props.current.steamid === player.steamid)}
|
|
/>)}
|
|
</div>
|
|
);
|
|
}
|
|
}
|