From cc3db2982dc22899a9ebea21e8a8dfbfd710f842 Mon Sep 17 00:00:00 2001 From: Victor Chabbert Date: Fri, 20 Jan 2017 23:18:57 +0100 Subject: DUCKS! Refactor front architecture --- frontend/src/containers/gameBrowser.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 frontend/src/containers/gameBrowser.js (limited to 'frontend/src/containers/gameBrowser.js') diff --git a/frontend/src/containers/gameBrowser.js b/frontend/src/containers/gameBrowser.js new file mode 100644 index 00000000..9deb720b --- /dev/null +++ b/frontend/src/containers/gameBrowser.js @@ -0,0 +1,31 @@ +import React, { Component } from 'react' +import { connect } from 'react-redux' +import { Flex } from 'reflexbox' +import { Text, Space } from 'rebass' + +class GameBrowser extends Component { + + listGames = (games) => { + return games.valueSeq().map((game, index) => { + return ( + {game.get('name')} + + Join + ) + }) + } + + render() { + return ( +
+ {this.listGames(this.props.games)} +
+ ) + } +} + +const mapStateToProps = (state) => ({ + games: state.games +}) + +export default connect(mapStateToProps, {})(GameBrowser) -- cgit