diff options
author | jbion <joffrey.bion@amadeus.com> | 2017-01-20 16:11:24 +0100 |
---|---|---|
committer | jbion <joffrey.bion@amadeus.com> | 2017-01-20 16:11:35 +0100 |
commit | b32cdf5c4f5d0b4f31b3bcfa64fe9328ed78d818 (patch) | |
tree | bdda009d448cb6b56415d90eae90eceb138318e4 /frontend/src/containers/GameBrowser/index.js | |
parent | Merge remote-tracking branch 'origin/feature/front' (diff) | |
download | seven-wonders-b32cdf5c4f5d0b4f31b3bcfa64fe9328ed78d818.tar.gz seven-wonders-b32cdf5c4f5d0b4f31b3bcfa64fe9328ed78d818.tar.bz2 seven-wonders-b32cdf5c4f5d0b4f31b3bcfa64fe9328ed78d818.zip |
Move frontend and backend into 2 separate subprojects
Diffstat (limited to 'frontend/src/containers/GameBrowser/index.js')
-rw-r--r-- | frontend/src/containers/GameBrowser/index.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/frontend/src/containers/GameBrowser/index.js b/frontend/src/containers/GameBrowser/index.js new file mode 100644 index 00000000..9deb720b --- /dev/null +++ b/frontend/src/containers/GameBrowser/index.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 (<Flex key={index}> + <Text>{game.get('name')}</Text> + <Space auto /> + <a href="#">Join</a> + </Flex>) + }) + } + + render() { + return ( + <div> + {this.listGames(this.props.games)} + </div> + ) + } +} + +const mapStateToProps = (state) => ({ + games: state.games +}) + +export default connect(mapStateToProps, {})(GameBrowser) |