1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00

handling sensors with redux

This commit is contained in:
2016-09-05 18:27:52 +00:00
parent be5e95b6cf
commit 0e8d2e5b2b
15 changed files with 200 additions and 69 deletions

View File

@@ -12,14 +12,17 @@ import 'font-awesome/css/font-awesome.min.css';
import '../../assets/css/dracula.css';
export default class Index extends React.Component {
componentDidMount(){
this.props.sensorActions.fetchSensorList();
}
render() {
return (
<div>
<Header/>
<div class="Main">
{React.cloneElement(this.props.children, this.props)}
<Sidebar/>
<Sidebar sensor={Object.assign({}, this.props.sensor)}/>
</div>
<Footer/>
</div>