File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-plusplus */
1
2
/* eslint-disable func-names */
2
3
/* eslint-disable react/no-this-in-sfc */
3
4
/* eslint-disable no-shadow */
@@ -30,7 +31,7 @@ import { addNewSnapshots } from '../actions/actions';
30
31
// }, [windowRef]);
31
32
32
33
const PerfView = ( { snapshots, viewIndex } ) => {
33
- const [ chartData , setChartData ] = useState ( snapshots [ snapshots . length - 1 ] ) ;
34
+ const [ chartData , updateChartData ] = useState ( snapshots [ snapshots . length - 1 ] ) ;
34
35
const svgRef = useRef ( null ) ;
35
36
36
37
// Todo: implement update functions...
@@ -72,10 +73,10 @@ const PerfView = ({ snapshots, viewIndex }) => {
72
73
}
73
74
74
75
if ( viewIndex < 0 ) {
75
- setChartData ( snapshots [ snapshots . length - 1 ] ) ;
76
+ updateChartData ( snapshots [ snapshots . length - 1 ] ) ;
76
77
console . log ( `Using snapshots[${ snapshots . length - 1 } ]` ) ;
77
78
} else {
78
- setChartData ( snapshots [ viewIndex ] ) ;
79
+ updateChartData ( snapshots [ viewIndex ] ) ;
79
80
console . log ( `Using snapshots[${ viewIndex } ]` ) ;
80
81
}
81
82
You can’t perform that action at this time.
0 commit comments