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

32 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 11:16:46 +01:00
import Stats from '../Others/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">
<div className="card-header">
This month
</div>
2018-06-07 12:42:30 +02:00
<div className="card-body">
2019-01-03 11:16:46 +01:00
<Stats statsParams={this.state} />
</div>
2018-05-09 10:25:08 +02:00
</div>
)
}
2018-05-09 10:25:08 +02:00
}