From 3f2c73cccc554c87bfe39ab706bf01690fb28baf Mon Sep 17 00:00:00 2001 From: Victor Chabbert Date: Sun, 22 Jan 2017 12:46:01 +0100 Subject: Handle game browser --- frontend/src/containers/app.js | 32 +++------------- frontend/src/index.js | 6 ++- frontend/src/redux/game.js | 4 +- frontend/src/redux/user.js | 2 +- frontend/src/sagas.js | 4 ++ frontend/src/sagas/gameBrowser.js | 66 ++++++++++++++++++++++++++++++++ frontend/src/sagas/lobby.js | 74 ------------------------------------ frontend/src/sagas/usernameChoice.js | 2 + 8 files changed, 84 insertions(+), 106 deletions(-) create mode 100644 frontend/src/sagas/gameBrowser.js delete mode 100644 frontend/src/sagas/lobby.js (limited to 'frontend/src') diff --git a/frontend/src/containers/app.js b/frontend/src/containers/app.js index d2245152..adfc557f 100644 --- a/frontend/src/containers/app.js +++ b/frontend/src/containers/app.js @@ -4,29 +4,13 @@ import { Banner, Heading, Space, - Button, InlineForm, Text } from 'rebass' import { Flex } from 'reflexbox' -import Modal from '../../components/modals/username' import GameBrowser from './gameBrowser' class App extends Component { - state = { - usernameModal: false, - } - - componentDidMount() { - - } - - toggleModal = (key) => { - return (e) => { - const val = !this.state[key] - this.setState({ [key]: val }) - } - } createGame = (e) => { e.preventDefault() @@ -53,31 +37,25 @@ class App extends Component { onChange={(e) => this._gameName = e.target.value} onClick={this.createGame} > - - Username: Cesar92 + Username: {this.props.username} -