diff options
author | jbion <joffrey.bion@amadeus.com> | 2019-02-26 18:27:08 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2019-02-26 18:27:30 +0100 |
commit | d80dc8c4cbe24f14f6c57463fb6aba11d2b5cad2 (patch) | |
tree | a8d6aba65573d72aaae968a7f341ab8a14b0a2e4 /frontend/src/components/lobby | |
parent | Move wonder images to frontend (diff) | |
download | seven-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.jsx | 5 |
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> ); } |