blob: f49a758904902c9f627420cf759e5276e8a14750 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import React from 'react'
import { Flex } from 'reflexbox'
import { Text, Space, Button } from 'rebass'
import Immutable from 'seamless-immutable'
const GameList = (props) => (
<div>
{Immutable.asMutable(props.games).map((game, index) => {
const joinGame = () => props.joinGame(game.id)
return (<Flex key={index}>
<Text>{game.name}</Text>
<Space auto />
<Button onClick={joinGame}>Join</Button>
</Flex>)
})}
</div>
)
export default GameList
|