1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-11-13 02:30:05 -05:00
moneygo/js/containers/ReportsTabContainer.js

24 lines
601 B
JavaScript

var connect = require('react-redux').connect;
var ReportActions = require('../actions/ReportActions');
var ReportsTab = require('../components/ReportsTab');
function mapStateToProps(state) {
return {
reports: state.reports,
selectedReport: state.selectedReport
}
}
function mapDispatchToProps(dispatch) {
return {
onFetchReport: function(reportname) {dispatch(ReportActions.fetch(reportname))},
onSelectReport: function(report, seriesTraversal) {dispatch(ReportActions.select(report, seriesTraversal))}
}
}
module.exports = connect(
mapStateToProps,
mapDispatchToProps
)(ReportsTab)