|
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'; |
6 | 5 | import { BarStack } from '@visx/shape';
|
7 | 6 | import { Group } from '@visx/group';
|
8 | 7 | import { Grid } from '@visx/grid';
|
@@ -57,13 +56,6 @@ const BarGraphComparison = (props: BarGraphComparisonProps): JSX.Element => {
|
57 | 56 | //tracking whether or not the clear series button is clicked
|
58 | 57 | const [buttonLoad, setButtonLoad] = useState(false);
|
59 | 58 |
|
60 |
| - 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 |
| - |
67 | 59 | const theme = useTheme();
|
68 | 60 | useEffect(() => {
|
69 | 61 | dispatch(setCurrentTabInApp('performance-comparison'));
|
@@ -206,37 +198,24 @@ 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 |
| - > |
214 | 201 | <Button
|
215 | 202 | variant='contained'
|
216 | 203 | sx={{ p: 2, color: 'white' }}
|
217 | 204 | // type='button'
|
218 | 205 | className='delete-button'
|
219 | 206 | onClick={() => {
|
220 |
| - setButtonLoad(true); |
221 | 207 | setButtonLoad(true);
|
222 | 208 | dispatch(deleteSeries());
|
223 | 209 |
|
224 | 210 | setTimeout(() => {
|
225 | 211 | setButtonLoad(false);
|
226 | 212 | }, 1000);
|
227 |
| - |
228 |
| - setTimeout(() => { |
229 |
| - setButtonLoad(false); |
230 |
| - }, 1000); |
231 | 213 | }}
|
232 | 214 | style={
|
233 | 215 | buttonLoad
|
234 | 216 | ? { 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>
|
242 | 221 | <h4 className='compare-series-box' style={{ padding: '0 1rem' }}>
|
|
0 commit comments