34 lines
764 B
React
Raw Normal View History

2019-01-03 11:16:46 +01:00
import { endOfMonth, startOfMonth, subMonths } from 'date-fns'
2018-07-29 17:59:35 +02:00
import React from 'react'
2019-01-03 11:16:46 +01:00
import Stats from '../Others/Stats'
2018-07-29 17:59:35 +02:00
2019-01-03 11:16:46 +01:00
export default class Statistics extends React.Component {
2018-07-29 17:59:35 +02:00
constructor(props, context) {
super(props, context)
const date = new Date()
this.state = {
start: startOfMonth(subMonths(date, 12)),
end: endOfMonth(date),
2019-01-03 11:16:46 +01:00
duration: 'month',
type: 'by_time',
2018-07-29 17:59:35 +02:00
}
}
render() {
return (
<div className="container dashboard">
<div className="card activity-card">
<div className="card-header">
Statistics
</div>
<div className="card-body">
2019-01-03 11:16:46 +01:00
<Stats statsParams={this.state} />
2018-07-29 17:59:35 +02:00
</div>
</div>
</div>
)
}
}