diff options
author | Joffrey BION <joffrey.bion@gmail.com> | 2017-05-11 19:47:49 +0200 |
---|---|---|
committer | Joffrey BION <joffrey.bion@gmail.com> | 2017-05-12 00:13:57 +0200 |
commit | b494d2d141a942b0905ac46a551ff42878f0f081 (patch) | |
tree | 18d94a3e86d0749f013075a110d6c43efaa782de /frontend/src/components/gameList.js | |
parent | Add time limit setting (diff) | |
download | seven-wonders-b494d2d141a942b0905ac46a551ff42878f0f081.tar.gz seven-wonders-b494d2d141a942b0905ac46a551ff42878f0f081.tar.bz2 seven-wonders-b494d2d141a942b0905ac46a551ff42878f0f081.zip |
First attempt at lobby joining
Diffstat (limited to 'frontend/src/components/gameList.js')
-rw-r--r-- | frontend/src/components/gameList.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/frontend/src/components/gameList.js b/frontend/src/components/gameList.js new file mode 100644 index 00000000..c8720b26 --- /dev/null +++ b/frontend/src/components/gameList.js @@ -0,0 +1,20 @@ +import React from 'react' +import { Flex } from 'reflexbox' +import { Text, Space, Button } from 'rebass' + +const GameList = (props) => ( + <div> + {props.games.map((game, index) => { + + const joinGame = () => props.joinGame(game.get('id')) + + return (<Flex key={index}> + <Text>{game.get('name')}</Text> + <Space auto /> + <Button onClick={joinGame}>Join</Button> + </Flex>) + })} + </div> +) + +export default GameList |