From 85a36a02c9eab05302525c906d6c888a13f8255c Mon Sep 17 00:00:00 2001 From: Felix Hamme Date: Thu, 6 Jun 2019 11:04:25 +0200 Subject: [PATCH] Add change score button (no functionality yet) --- js/components/MatchModal.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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}