From 66146fb2826cb06777558743bd70f91147fd27a0 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Wed, 3 Feb 2021 09:35:55 +0100 Subject: working edit game rules :tada: --- components/gameSettings.tsx | 10 ++++++++-- components/ui.tsx | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'components') diff --git a/components/gameSettings.tsx b/components/gameSettings.tsx index c41d55a..8bffeee 100644 --- a/components/gameSettings.tsx +++ b/components/gameSettings.tsx @@ -38,6 +38,12 @@ export class CurrentGameSettings extends Component { setGameRules = (newRules: ruleset) => this.setState({ ruleset: newRules }); render() { + var timelimit_str = this.state.ruleset.timelimit.enabled ? + `${this.state.ruleset.timelimit.minutes}m${this.state.ruleset.timelimit.seconds}s plus ${this.state.ruleset.timelimit.addmove}` : + "Geen tijdslimiet" + var ranked_str = this.state.ruleset.ranked ? + "Gerangschikt" : + "Niet gerangschikt" return
- Geen tijdslimiet
- Gerangschikt + {timelimit_str}
+ {ranked_str}