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