1
0
mirror of https://github.com/lexogrine/cs2-react-hud.git synced 2026-05-04 12:13:11 +02:00

initial commit

This commit is contained in:
Hubert Walczak
2023-09-11 12:37:32 +02:00
commit 989ede8638
247 changed files with 7656 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
import React from 'react';
import * as I from '../../api/interfaces';
import TeamLogo from '../MatchBar/TeamLogo';
interface IProps {
match: I.Match,
show: boolean,
teams: I.Team[],
veto: I.Veto | null
}
export default class MatchOverview extends React.Component<IProps> {
render() {
const { match, teams, show } = this.props;
const left = teams.find(team => team._id === match.left.id);
const right = teams.find(team => team._id === match.right.id);
if(!match || !left || !right) return null;
return (
<div className={`match-overview ${show ? 'show':''}`}>
<div className="match-overview-title">
Upcoming match
</div>
<div className="match-overview-teams">
<div className="match-overview-team">
<div className="match-overview-team-logo">
<TeamLogo team={left} height={40} />
</div>
<div className="match-overview-team-name">{left.name}</div>
</div>
<div className="match-overview-vs">vs</div>
<div className="match-overview-team">
<div className="match-overview-team-logo">
<TeamLogo team={right} height={40} />
</div>
<div className="match-overview-team-name">{right.name}</div>
</div>
</div>
</div>
);
}
}