FitTrackee/fittrackee_client/src/components/Dashboard/Statistics.jsx

29 lines
664 B
React
Raw Normal View History

2019-01-03 11:16:46 +01:00
import { endOfMonth, startOfMonth } from 'date-fns'
2018-05-09 10:25:08 +02:00
import React from 'react'
2019-01-03 12:53:47 +01:00
import Stats from '../Common/Stats'
2018-05-09 10:25:08 +02:00
2019-01-03 11:16:46 +01:00
export default class Statistics extends React.Component {
constructor(props, context) {
super(props, context)
const date = new Date()
this.state = {
start: startOfMonth(date),
end: endOfMonth(date),
2019-01-03 11:16:46 +01:00
duration: 'week',
type: 'by_time',
}
}
render() {
return (
<div className="card activity-card">
2019-08-28 15:35:22 +02:00
<div className="card-header">This month</div>
2018-06-07 12:42:30 +02:00
<div className="card-body">
<Stats displayEmpty={false} statsParams={this.state} />
</div>
2018-05-09 10:25:08 +02:00
</div>
)
}
2018-05-09 10:25:08 +02:00
}