diff options
author | Victor Chabbert <chabbertvi@eisti.eu> | 2017-07-31 18:48:19 +0200 |
---|---|---|
committer | Victor Chabbert <chabbertvi@eisti.eu> | 2017-08-07 22:41:20 +0200 |
commit | d605156a5f61a1fe9d18bac8407cdec4ec0aa9a3 (patch) | |
tree | 35f7f80c75a91d30e1ba5c72e8bb487a1ccdbb52 /frontend/src/containers/lobby.js | |
parent | Refactor routes to new structure (diff) | |
download | seven-wonders-d605156a5f61a1fe9d18bac8407cdec4ec0aa9a3.tar.gz seven-wonders-d605156a5f61a1fe9d18bac8407cdec4ec0aa9a3.tar.bz2 seven-wonders-d605156a5f61a1fe9d18bac8407cdec4ec0aa9a3.zip |
Remove containers folder
Diffstat (limited to 'frontend/src/containers/lobby.js')
-rw-r--r-- | frontend/src/containers/lobby.js | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/frontend/src/containers/lobby.js b/frontend/src/containers/lobby.js deleted file mode 100644 index bf0cb031..00000000 --- a/frontend/src/containers/lobby.js +++ /dev/null @@ -1,42 +0,0 @@ -import { List } from 'immutable'; -import React, { Component } from 'react'; -import { connect } from 'react-redux'; -import { Button } from 'rebass'; -import PlayerList from '../components/playerList'; -import { actions, getCurrentGame } from '../redux/games'; -import { getPlayers } from '../redux/players'; - -class Lobby extends Component { - getTitle() { - if (this.props.currentGame) { - return this.props.currentGame.name + ' — Lobby'; - } else { - return 'What are you doing here? You haven\'t joined a game yet!'; - } - } - - render() { - return ( - <div> - <h2>{this.getTitle()}</h2> - <PlayerList players={this.props.players} /> - <Button onClick={this.props.startGame}>Start Game</Button> - </div> - ); - } -} - -const mapStateToProps = state => { - const game = getCurrentGame(state.get('games')); - console.info(game); - return { - currentGame: game, - players: game ? getPlayers(state.get('players'), game.players) : new List(), - }; -}; - -const mapDispatchToProps = { - startGame: actions.requestStartGame, -}; - -export default connect(mapStateToProps, mapDispatchToProps)(Lobby); |