diff options
Diffstat (limited to 'frontend/src/components/gameList.js')
-rw-r--r-- | frontend/src/components/gameList.js | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/frontend/src/components/gameList.js b/frontend/src/components/gameList.js index b4167927..e1d011e1 100644 --- a/frontend/src/components/gameList.js +++ b/frontend/src/components/gameList.js @@ -1,20 +1,22 @@ -import React from 'react' -import { Flex } from 'reflexbox' -import { Text, Space, Button } from 'rebass' -import Immutable from 'seamless-immutable' +import React from "react"; +import { Flex } from "reflexbox"; +import { Text, Space, Button } from "rebass"; +import Immutable from "seamless-immutable"; -const GameList = (props) => ( +const GameList = props => ( <div> {Immutable.asMutable(props.games).map((game, index) => { - const joinGame = () => props.joinGame(game.id) + const joinGame = () => props.joinGame(game.id); - return (<Flex key={index}> - <Text>{game.name}</Text> - <Space auto /> - <Button onClick={joinGame}>Join</Button> - </Flex>) + return ( + <Flex key={index}> + <Text>{game.name}</Text> + <Space auto /> + <Button onClick={joinGame}>Join</Button> + </Flex> + ); })} </div> -) +); -export default GameList +export default GameList; |