summaryrefslogtreecommitdiff
path: root/frontend/src/components/lobby
diff options
context:
space:
mode:
authorjbion <joffrey.bion@amadeus.com>2019-02-26 18:27:08 +0100
committerjbion <joffrey.bion@amadeus.com>2019-02-26 18:27:30 +0100
commitd80dc8c4cbe24f14f6c57463fb6aba11d2b5cad2 (patch)
treea8d6aba65573d72aaae968a7f341ab8a14b0a2e4 /frontend/src/components/lobby
parentMove wonder images to frontend (diff)
downloadseven-wonders-d80dc8c4cbe24f14f6c57463fb6aba11d2b5cad2.tar.gz
seven-wonders-d80dc8c4cbe24f14f6c57463fb6aba11d2b5cad2.tar.bz2
seven-wonders-d80dc8c4cbe24f14f6c57463fb6aba11d2b5cad2.zip
Hide start button for non-game owners and disable while we can't start
Diffstat (limited to 'frontend/src/components/lobby')
-rw-r--r--frontend/src/components/lobby/Lobby.jsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/frontend/src/components/lobby/Lobby.jsx b/frontend/src/components/lobby/Lobby.jsx
index df6557af..f352ab83 100644
--- a/frontend/src/components/lobby/Lobby.jsx
+++ b/frontend/src/components/lobby/Lobby.jsx
@@ -1,5 +1,5 @@
//@flow
-import { Button } from '@blueprintjs/core';
+import { Button, Classes, Intent } from '@blueprintjs/core';
import { List } from 'immutable';
import React, { Component } from 'react';
import { connect } from 'react-redux';
@@ -25,7 +25,8 @@ class LobbyPresenter extends Component<LobbyProps> {
<div>
<h2>{currentGame.name + ' — Lobby'}</h2>
<RadialPlayerList players={players} owner={currentGame.owner} currentPlayer={currentPlayer}/>
- <Button onClick={startGame}>Start Game</Button>
+ {currentPlayer.gameOwner && <Button text="START" className={Classes.LARGE} intent={Intent.PRIMARY} icon='play'
+ onClick={startGame} disabled={players.size < 3}/>}
</div>
);
}
bgstack15