import React,{ Component,PropTypes }from 'react'
import Header from '../components/Header.jsx'
import { Link } from 'react-router'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import * as actions from '../redux/actions/home'
import '../styles/home.sass'
let _key = 0;
class Home extends Component{
constructor(props,context){
super(props,context);
}
componentDidMount(){
this.props.actions.fetchBanner()
const { banner } = this.props;
}
render(){
return(
)
}
}
const mapStateToProps = (state) => {
return {
banner:state.homeState.banner
nowplay:state.homeState.nowplay,
coming:state.homeState.coming
}
}
const mapDispatchToProps = (dispatch) => {
return {
actions: bindActionCreators(actions,dispatch)
}
}
const mapDispatchToProps = (dispatch) => {
return {
onSwitchColor: (color) => {
dispatch({ type: 'CHANGE_COLOR', themeColor: color })
}
}
}
export default connect(mapStateToProps,mapDispatchToProps)(Home);