Adjust DominanceShower to the actually implemented API data

This commit is contained in:
JP1998 2019-05-29 04:03:32 +02:00
parent 3aab76972b
commit da4b5ac2e5
2 changed files with 5 additions and 5 deletions

View File

@ -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>

View File

@ -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>