blob: 0b13cfe75f3417f8e9df4846efa53104013439e0 (
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
32
33
|
import { h, Component } from 'preact'
import { bindActionCreators } from 'redux'
import { connect } from 'react-redux'
class Gallery extends Component {
constructor(props){
super()
}
render(){
const { title, images } = this.props
const imageList = images.map(image => {
return (
<div>
<img src={image.url} />
</div>
)
})
imageList.push(imageList[0])
return (
<div class='gallery'>
{imageList}
</div>
)
}
}
const mapStateToProps = state => ({
})
const mapDispatchToProps = (dispatch, ownProps) => ({
// actions: bindActionCreators(liveActions, dispatch)
})
export default connect(mapStateToProps, mapDispatchToProps)(Gallery)
|