From 01a88bc4ba88f2fa83d2fa15671b5d52ec34fcc6 Mon Sep 17 00:00:00 2001 From: Victor Chabbert Date: Tue, 20 Dec 2016 11:09:43 +0100 Subject: Add create game logic --- src/main/js/src/containers/App/index.js | 41 +++++++++++++++------- src/main/js/src/containers/GameBrowser/actions.js | 7 +++- .../js/src/containers/GameBrowser/constants.js | 1 + src/main/js/src/containers/GameBrowser/saga.js | 25 ++++++++++--- 4 files changed, 56 insertions(+), 18 deletions(-) (limited to 'src/main') diff --git a/src/main/js/src/containers/App/index.js b/src/main/js/src/containers/App/index.js index 5d9bba3c..3b7e8fbf 100644 --- a/src/main/js/src/containers/App/index.js +++ b/src/main/js/src/containers/App/index.js @@ -1,9 +1,11 @@ import React, { Component } from 'react' +import { connect } from 'react-redux' import { Banner, Heading, Space, Button, + InlineForm, Text } from 'rebass' import { Flex } from 'reflexbox' @@ -12,7 +14,7 @@ import GameBrowser from '../GameBrowser' class App extends Component { state = { - usernameModal: false + usernameModal: false, } componentDidMount() { @@ -26,6 +28,11 @@ class App extends Component { } } + createGame = (e) => { + e.preventDefault() + this.props.createGame(this._gameName) + } + render() { return (
@@ -37,9 +44,15 @@ class App extends Component { Seven Wonders -