summaryrefslogtreecommitdiff
path: root/frontend/src/components/gameList.js
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@gmail.com>2017-05-28 21:32:36 +0200
committerGitHub <noreply@github.com>2017-05-28 21:32:36 +0200
commitba9cd259ed1ca2370565265eab9fe2628ad6502c (patch)
tree0c24821770274a414f80b3092d5be54902c042d9 /frontend/src/components/gameList.js
parentFix proxy not working since CRA upgrade (diff)
parentMove to immutable with Records (diff)
downloadseven-wonders-ba9cd259ed1ca2370565265eab9fe2628ad6502c.tar.gz
seven-wonders-ba9cd259ed1ca2370565265eab9fe2628ad6502c.tar.bz2
seven-wonders-ba9cd259ed1ca2370565265eab9fe2628ad6502c.zip
Merge pull request #14 from luxons/immutable
Move to immutable with Records
Diffstat (limited to 'frontend/src/components/gameList.js')
-rw-r--r--frontend/src/components/gameList.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/frontend/src/components/gameList.js b/frontend/src/components/gameList.js
index f3a0d381..17dad16f 100644
--- a/frontend/src/components/gameList.js
+++ b/frontend/src/components/gameList.js
@@ -1,18 +1,15 @@
import React from 'react';
import { Flex } from 'reflexbox';
import { Text, Space, Button } from 'rebass';
-import Immutable from 'seamless-immutable';
-const GameList = props => (
+const GameList = ({ games, joinGame }) => (
<div>
- {Immutable.asMutable(props.games).map((game, index) => {
- const joinGame = () => props.joinGame(game.id);
-
+ {games.map((game, index) => {
return (
<Flex key={index}>
<Text>{game.name}</Text>
<Space auto />
- <Button onClick={joinGame}>Join</Button>
+ <Button onClick={() => joinGame(game.id)}>Join</Button>
</Flex>
);
})}
bgstack15