diff options
Diffstat (limited to 'frontend/src/components')
-rw-r--r-- | frontend/src/components/gameList.js | 7 | ||||
-rw-r--r-- | frontend/src/components/playerList.js | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/frontend/src/components/gameList.js b/frontend/src/components/gameList.js index c8720b26..f49a7589 100644 --- a/frontend/src/components/gameList.js +++ b/frontend/src/components/gameList.js @@ -1,15 +1,16 @@ import React from 'react' import { Flex } from 'reflexbox' import { Text, Space, Button } from 'rebass' +import Immutable from 'seamless-immutable' const GameList = (props) => ( <div> - {props.games.map((game, index) => { + {Immutable.asMutable(props.games).map((game, index) => { - const joinGame = () => props.joinGame(game.get('id')) + const joinGame = () => props.joinGame(game.id) return (<Flex key={index}> - <Text>{game.get('name')}</Text> + <Text>{game.name}</Text> <Space auto /> <Button onClick={joinGame}>Join</Button> </Flex>) diff --git a/frontend/src/components/playerList.js b/frontend/src/components/playerList.js index 30384d53..45aa01a2 100644 --- a/frontend/src/components/playerList.js +++ b/frontend/src/components/playerList.js @@ -1,13 +1,14 @@ import React from 'react' import { Flex } from 'reflexbox' import { Text } from 'rebass' +import Immutable from 'seamless-immutable' const PlayerList = (props) => ( <div> - {props.players.map((player, index) => { + {Immutable.asMutable(props.players).map((player, index) => { return (<Flex key={index}> - <Text>{player.get('displayName')}</Text> - <Text>({player.get('username')})</Text> + <Text>{player.displayName}</Text> + <Text>({player.username})</Text> </Flex>) })} </div> |