2
2
/// <reference lib="dom" />
3
3
/* eslint-disable no-param-reassign */
4
4
import React , { useEffect , useState } from 'react' ;
5
- import React , { useEffect , useState } from 'react' ;
5
+
6
6
import { BarStack } from '@visx/shape' ;
7
7
import { Group } from '@visx/group' ;
8
8
import { Grid } from '@visx/grid' ;
@@ -53,18 +53,10 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
53
53
const { width, height, data, comparison, setSeries, series, setAction } = props ;
54
54
const [ snapshots ] = useState ( 0 ) ;
55
55
const [ open , setOpen ] = useState ( false ) ;
56
- const [ picOpen , setPicOpen ] = useState ( false ) ;
57
- //tracking whether or not the clear series button is clicked
58
- const [ buttonLoad , setButtonLoad ] = useState ( false ) ;
59
-
56
+ const [ picOpen , setPicOpen ] = useState ( false ) ;
57
+ const [ buttonLoad , setButtonLoad ] = useState ( false ) ; //tracking whether or not the clear series button is clicked
60
58
const theme = useTheme ( ) ;
61
- const [ snapshots ] = useState ( 0 ) ;
62
- const [ open , setOpen ] = useState ( false ) ;
63
- const [ picOpen , setPicOpen ] = useState ( false ) ;
64
- //tracking whether or not the clear series button is clicked
65
- const [ buttonLoad , setButtonLoad ] = useState ( false ) ;
66
59
67
- const theme = useTheme ( ) ;
68
60
useEffect ( ( ) => {
69
61
dispatch ( setCurrentTabInApp ( 'performance-comparison' ) ) ;
70
62
} , [ dispatch ] ) ;
@@ -206,11 +198,7 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
206
198
< div >
207
199
< div className = 'series-options-container' >
208
200
< div className = 'dropdown-and-delete-series-container' >
209
- < Button
210
- variant = 'contained'
211
- sx = { { p : 2 , color : 'white' } }
212
- // type='button'
213
- >
201
+
214
202
< Button
215
203
variant = 'contained'
216
204
sx = { { p : 2 , color : 'white' } }
@@ -224,21 +212,13 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
224
212
setTimeout ( ( ) => {
225
213
setButtonLoad ( false ) ;
226
214
} , 1000 ) ;
227
-
228
- setTimeout ( ( ) => {
229
- setButtonLoad ( false ) ;
230
- } , 1000 ) ;
231
215
} }
232
- style = {
233
- buttonLoad
234
- ? { backgroundColor : theme . palette . primary . main }
216
+ style = { buttonLoad ? { backgroundColor : theme . palette . primary . main }
235
217
: { backgroundColor : theme . palette . secondary . main }
236
- }
237
- >
238
- { buttonLoad ? 'Deleted' : 'Clear Series' }
239
- </ Button >
218
+ } >
240
219
{ buttonLoad ? 'Deleted' : 'Clear Series' }
241
220
</ Button >
221
+
242
222
< h4 className = 'compare-series-box' style = { { padding : '0 1rem' } } >
243
223
Compare Series:{ ' ' }
244
224
</ h4 >
0 commit comments