diff --git a/js/components/GroupStage.js b/js/components/GroupStage.js new file mode 100644 index 0000000..d5da349 --- /dev/null +++ b/js/components/GroupStage.js @@ -0,0 +1,52 @@ +import {Card, CardBody, Col, Row, Table} from 'reactstrap'; +import {Match} from './Match'; +import React from 'react'; + +export default function GroupStage(props) { + return (
+

Gruppenphase

+ + {props.groups.map(group => )} + +
); +} + +function Group(props) { + return ( + + +

Gruppe {props.group.id + 1}

+ {props.group.matches.map((match => ( + )))} + +
+
+ ); +} + +function GroupScoresTable(props) { + return ( + + + + + + + + + + {props.scores.map(groupScore => )} + +
TeamPunkteerzieltkassiert
); +} + + +function GroupScoresTableRow(props) { + return ( + {props.score.team.name} + {props.score.group_points} + {props.score.received_points} + {props.score.scored_points} + ); +} diff --git a/pages/tournament.js b/pages/tournament.js index 23878be..f87cd5f 100644 --- a/pages/tournament.js +++ b/pages/tournament.js @@ -14,11 +14,13 @@ import '../static/css/everypage.css'; import '../static/css/tournament.css'; import {getTournament} from '../js/redux/tournamentApi'; import {PlayoffStages} from '../js/components/PlayoffStages'; +import GroupStage from '../js/components/GroupStage'; class PrivateTournamentPage extends React.Component { render() { - const {id, description, isPublic, code, ownerUsername, playoffStages} = this.props.tournament; + const {id, description, isPublic, code, ownerUsername, playoffStages, groupStage} = this.props.tournament; const {isSignedIn, username} = this.props; + const isOwner = username === ownerUsername; // TODO: Change href-prop of the anchor tag to contain the tournament code return (
@@ -34,8 +36,10 @@ class PrivateTournamentPage extends React.Component {
+ {groupStage != null && +
} + isOwner={isOwner}/>
); }