mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-11-10 10:00:04 -05:00
24 lines
515 B
JavaScript
24 lines
515 B
JavaScript
var React = require('react');
|
|
|
|
var StackedBarChart = require('../components/StackedBarChart');
|
|
|
|
module.exports = React.createClass({
|
|
displayName: "ReportsTab",
|
|
getInitialState: function() {
|
|
return { };
|
|
},
|
|
componentWillMount: function() {
|
|
this.props.onFetchReport("monthly_expenses");
|
|
},
|
|
render: function() {
|
|
report = [];
|
|
if (this.props.reports['monthly_expenses'])
|
|
report = (<StackedBarChart data={this.props.reports['monthly_expenses']} />);
|
|
return (
|
|
<div>
|
|
{report}
|
|
</div>
|
|
);
|
|
}
|
|
});
|