aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/gameSettings.tsx10
-rw-r--r--components/ui.tsx2
2 files changed, 9 insertions, 3 deletions
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 <div style={{
position: "relative",
height: 80,
@@ -53,8 +59,8 @@ export class CurrentGameSettings extends Component {
left: 0,
transform: "translateY(-50%)"
}}>
- Geen tijdslimiet<br/>
- Gerangschikt
+ {timelimit_str}<br/>
+ {ranked_str}
</p>
<Button style={{
width: 150,
diff --git a/components/ui.tsx b/components/ui.tsx
index 8745c67..ef9d8f3 100644
--- a/components/ui.tsx
+++ b/components/ui.tsx
@@ -74,7 +74,7 @@ export function Input(props: {
min={props.min} max={props.max}
placeholder={props.label}
spellCheck={false}
- value={props.value}
+ defaultValue={props.value ? String(props.value) : ""}
style={{
padding: 12,
border: 0,