From e4dd4d0e84d0b14c9e71cd72f45e0099273476f1 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Tue, 15 Feb 2022 16:28:43 -0300 Subject: [PATCH] 18315: Removes unnecessary state handling code. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- .../collection-panel-files/collection-panel-files.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/components/collection-panel-files/collection-panel-files.tsx b/src/components/collection-panel-files/collection-panel-files.tsx index 1ee6df3043..1f7e8603c5 100644 --- a/src/components/collection-panel-files/collection-panel-files.tsx +++ b/src/components/collection-panel-files/collection-panel-files.tsx @@ -201,7 +201,6 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState const [path, setPath]: any = React.useState([]); const [pathData, setPathData]: any = React.useState({}); const [isLoading, setIsLoading] = React.useState(false); - const [collectionAutofetchEnabled, setCollectionAutofetchEnabled] = React.useState(false); const [leftSearch, setLeftSearch] = React.useState(''); const [rightSearch, setRightSearch] = React.useState(''); @@ -314,10 +313,6 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState if (id) { onItemMenuOpen(event, item, isWritable); - - if (!collectionAutofetchEnabled) { - setCollectionAutofetchEnabled(true); - } } }, [onItemMenuOpen, isWritable, rightData] // eslint-disable-line react-hooks/exhaustive-deps @@ -444,9 +439,6 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState { - if (!collectionAutofetchEnabled) { - setCollectionAutofetchEnabled(true); - } onOptionsMenuOpen(ev, isWritable); }}> @@ -516,9 +508,6 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState className={classes.uploadButton} data-cy='upload-button' onClick={() => { - if (!collectionAutofetchEnabled) { - setCollectionAutofetchEnabled(true); - } onUploadDataClick(); }} variant='contained' -- 2.30.2