mirror of
https://github.com/aclindsa/moneygo.git
synced 2024-10-30 15:50:04 -04: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>
|
|
);
|
|
}
|
|
});
|