Adjust DominanceShower to the actually implemented API data
This commit is contained in:
parent
3aab76972b
commit
da4b5ac2e5
|
|
@ -6,8 +6,6 @@ import {
|
|||
Table
|
||||
} from 'reactstrap';
|
||||
|
||||
import { findTeam } from '../utils/findTeam';
|
||||
|
||||
export class DominanceShower extends React.Component {
|
||||
|
||||
render() {
|
||||
|
|
@ -18,7 +16,7 @@ export class DominanceShower extends React.Component {
|
|||
<Table borderless className="m-0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th colSpan="2" className="h3 text-center">{findTeam(this.props.teams, this.props.stats.id).name}</th>
|
||||
<th colSpan="2" className="h3 text-center">{this.props.stats.team_name}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="h4 text-success pb-0">{this.props.stats.points_made}</td>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ class StatisticsTournamentPage extends React.Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
/*
|
||||
let tournamentStatistics = {
|
||||
tournament: {
|
||||
code: 'abcd1234',
|
||||
|
|
@ -185,6 +186,7 @@ class StatisticsTournamentPage extends React.Component {
|
|||
points_received: 103
|
||||
}
|
||||
};
|
||||
*/
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
|
@ -198,10 +200,10 @@ class StatisticsTournamentPage extends React.Component {
|
|||
<Container className="py-5">
|
||||
<Row>
|
||||
<Col xs="6">
|
||||
<DominanceShower teams={tournamentStatistics.teams} stats={tournamentStatistics.most_dominant_team} title="Stärkstes Team"/>
|
||||
<DominanceShower stats={tournamentStatistics.most_dominant_team} title="Stärkstes Team"/>
|
||||
</Col>
|
||||
<Col xs="6">
|
||||
<DominanceShower teams={tournamentStatistics.teams} stats={tournamentStatistics.least_dominant_team} title="Schwächstes Team"/>
|
||||
<DominanceShower stats={tournamentStatistics.least_dominant_team} title="Schwächstes Team"/>
|
||||
</Col>
|
||||
</Row>
|
||||
</Container>
|
||||
|
|
|
|||
Loading…
Reference in New Issue