From d957ad417df54f6ff47ac4ab57f6c802e7fb8583 Mon Sep 17 00:00:00 2001 From: JP1998 Date: Mon, 15 Apr 2019 12:35:09 +0200 Subject: [PATCH] Rename property 'fadeIn' to 'groupPhaseEnabled' I think this name is much more descriptive of what this property actually represents. --- pages/create.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pages/create.js b/pages/create.js index b8ad288..895eaee 100644 --- a/pages/create.js +++ b/pages/create.js @@ -91,8 +91,11 @@ function CreateTournamentCard() { class CreateTournamentForm extends React.Component { constructor(props) { super(props); - this.state = {fadeIn: false, teams: []}; - this.toggle = this.toggle.bind(this); + this.state = { + groupPhaseEnabled: false, + teams: [] + }; + this.handleGroupPhaseEnabledInput = this.handleGroupPhaseEnabledInput.bind(this); this.teamListUpdate = this.teamListUpdate.bind(this); } @@ -112,9 +115,10 @@ class CreateTournamentForm extends React.Component { - + - @@ -139,9 +143,7 @@ class CreateTournamentForm extends React.Component { this.setState({teams: list}); } - toggle() { - this.setState({ - fadeIn: !this.state.fadeIn - }); + handleGroupPhaseEnabledInput(input) { + this.setState({ groupPhaseEnabled: input.target.checked }); } -} \ No newline at end of file +}