blob: 9deb720b4bc4cec145559ce6acbf13aeebb474cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { Flex } from 'reflexbox'
import { Text, Space } from 'rebass'
class GameBrowser extends Component {
listGames = (games) => {
return games.valueSeq().map((game, index) => {
return (<Flex key={index}>
<Text>{game.get('name')}</Text>
<Space auto />
<a href="#">Join</a>
</Flex>)
})
}
render() {
return (
<div>
{this.listGames(this.props.games)}
</div>
)
}
}
const mapStateToProps = (state) => ({
games: state.games
})
export default connect(mapStateToProps, {})(GameBrowser)
|