1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-28 08:12:28 -05:00
moneygo/js/containers/ReportsTabContainer.js

24 lines
601 B
JavaScript
Raw Normal View History

2017-02-11 20:39:38 -05:00
var connect = require('react-redux').connect;
var ReportActions = require('../actions/ReportActions');
var ReportsTab = require('../components/ReportsTab');
function mapStateToProps(state) {
return {
2017-02-17 10:01:31 -05:00
reports: state.reports,
selectedReport: state.selectedReport
2017-02-11 20:39:38 -05:00
}
}
function mapDispatchToProps(dispatch) {
return {
2017-02-17 10:01:31 -05:00
onFetchReport: function(reportname) {dispatch(ReportActions.fetch(reportname))},
onSelectReport: function(report, seriesTraversal) {dispatch(ReportActions.select(report, seriesTraversal))}
2017-02-11 20:39:38 -05:00
}
}
module.exports = connect(
mapStateToProps,
mapDispatchToProps
)(ReportsTab)