Skip to content

Commit 4d05072

Browse files
committed
Lint TimelineChart.jsx
1 parent a903e0a commit 4d05072

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed
Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,36 @@
1-
import React from 'react';
1+
import { bindActionCreators } from "redux";
22
import { connect } from "react-redux";
3+
import ReactFlot from "react-flot";
34
import { setDateRange, receiveJSON } from "../redux/actions";
45
import "react-dom";
56

6-
import ReactFlot from 'react-flot';
7-
import 'react-flot/flot/jquery.flot.time.min';
8-
import 'react-flot/flot/jquery.flot.selection.min';
9-
import { bindActionCreators } from "redux";
7+
import "react-flot/flot/jquery.flot.time.min";
8+
import "react-flot/flot/jquery.flot.selection.min";
109

11-
let currentJSONController = null;
1210
class TimelineChart extends ReactFlot {
13-
constructor(props) {
14-
super(props);
15-
}
16-
1711
componentDidMount() {
1812
this.draw();
19-
$(`#${this.props.id}`).bind('plotselected', (event, ranges) => {
20-
this.props.actions.setDateRange(Math.round(ranges.xaxis.from / 1000), Math.round(ranges.xaxis.to / 1000));
13+
$(`#${this.props.id}`).bind("plotselected", (event, ranges) => {
14+
this.props.actions.setDateRange(
15+
Math.round(ranges.xaxis.from / 1000),
16+
Math.round(ranges.xaxis.to / 1000)
17+
);
2118
});
2219
}
2320
}
2421

25-
const mapStateToProps = state => ({
22+
const mapStateToProps = (state) => ({
2623
...state,
2724
});
2825

29-
const mapDispatchToProps = dispatch => ({
26+
const mapDispatchToProps = (dispatch) => ({
3027
actions: bindActionCreators(
3128
{
3229
setDateRange,
3330
receiveJSON,
3431
},
35-
dispatch,
32+
dispatch
3633
),
3734
});
3835

39-
export default connect(
40-
mapStateToProps,
41-
mapDispatchToProps,
42-
)(TimelineChart);
36+
export default connect(mapStateToProps, mapDispatchToProps)(TimelineChart);

0 commit comments

Comments
 (0)