diff --git a/js/components/MatchModal.js b/js/components/MatchModal.js index 9a84a30..9fd14a3 100644 --- a/js/components/MatchModal.js +++ b/js/components/MatchModal.js @@ -6,15 +6,19 @@ import {MatchTable} from './MatchTable'; export function MatchModal(props) { let title; let actionButton = ''; + let submitScoresButton = ''; + let matchTable = ; // possible states: single_team not_ready not_started in_progress finished switch (props.match.state) { case 'in_progress': title = 'Spiel läuft'; + submitScoresButton = ; if (!props.match.allowUndecided && props.match.team1.score === props.match.team2.score) { actionButton = ; } else { actionButton = ; } + matchTable = ; break; case 'finished': title = 'Spiel beendet'; @@ -33,10 +37,10 @@ export function MatchModal(props) { return ( {title} - {props.match.state === 'in_progress' ? : - } + {matchTable} + {submitScoresButton} {actionButton}