23 lines
446 B
JavaScript
23 lines
446 B
JavaScript
|
var connect = require('react-redux').connect;
|
||
|
|
||
|
var LunchStats = require('../components/LunchStats');
|
||
|
|
||
|
var ReportActions = require('../actions/ReportActions');
|
||
|
|
||
|
function mapStateToProps(state) {
|
||
|
return {
|
||
|
reports: state.reports
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function mapDispatchToProps(dispatch) {
|
||
|
return {
|
||
|
fetchReport: function(reportId) {dispatch(ReportActions.fetch(reportId))},
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = connect(
|
||
|
mapStateToProps,
|
||
|
mapDispatchToProps
|
||
|
)(LunchStats)
|