1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-09-21 04:10:05 -04:00
moneygo/js/components/ReportsTab.js

24 lines
515 B
JavaScript
Raw Normal View History

2017-02-11 20:39:38 -05:00
var React = require('react');
2017-02-15 20:56:41 -05:00
var StackedBarChart = require('../components/StackedBarChart');
2017-02-11 20:39:38 -05:00
module.exports = React.createClass({
displayName: "ReportsTab",
getInitialState: function() {
return { };
},
componentWillMount: function() {
this.props.onFetchReport("monthly_expenses");
},
render: function() {
2017-02-15 20:56:41 -05:00
report = [];
if (this.props.reports['monthly_expenses'])
report = (<StackedBarChart data={this.props.reports['monthly_expenses']} />);
2017-02-11 20:39:38 -05:00
return (
2017-02-15 20:56:41 -05:00
<div>
{report}
</div>
2017-02-11 20:39:38 -05:00
);
}
});