From ade5fa2f7597a5a45a18b63a505aa732aaf71539 Mon Sep 17 00:00:00 2001 From: fnguyen Date: Fri, 10 Nov 2023 15:50:42 -0500 Subject: [PATCH] Linter fixes --- src/ui-component/ingest/IngestMenu.js | 2 +- src/views/clinicalGenomic/search/SearchHandler.js | 6 +++--- src/views/clinicalGenomic/widgets/sidebar.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ui-component/ingest/IngestMenu.js b/src/ui-component/ingest/IngestMenu.js index e9ebe568..bc84b3dc 100644 --- a/src/ui-component/ingest/IngestMenu.js +++ b/src/ui-component/ingest/IngestMenu.js @@ -120,7 +120,7 @@ function IngestMenu() { }); } - useEffect(() => ingestError && setIngestState(IngestStates.ERROR), [ingestError]); + useEffect(() => ingestError && setIngestState(IngestStates.ERROR), [ingestError, IngestStates.ERROR]); function getPage(val) { if (val === 0) diff --git a/src/views/clinicalGenomic/search/SearchHandler.js b/src/views/clinicalGenomic/search/SearchHandler.js index 2e66a01b..acb1a43c 100644 --- a/src/views/clinicalGenomic/search/SearchHandler.js +++ b/src/views/clinicalGenomic/search/SearchHandler.js @@ -3,11 +3,11 @@ import { useEffect, useState } from 'react'; import { trackPromise } from 'react-promise-tracker'; import { useSearchResultsWriterContext, useSearchQueryReaderContext } from '../SearchResultsContext'; -import { fetchFederationStat, fetchFederation, searchVariant, searchVariantByGene, query } from 'store/api'; +import { fetchFederationStat, fetchFederation, query } from 'store/api'; // This will grab all of the results from a query, but continue to consume all "next" from the pagination until we are complete // This defeats the purpose of pagination, and is frowned upon, but... deadlines -function ConsumeAllPages(url, resultConsumer, service = 'katsu') { +/* function ConsumeAllPages(url, resultConsumer, service = 'katsu') { const parsedData = {}; const RecursiveQuery = (data, idx) => { let nextQuery = null; @@ -35,7 +35,7 @@ function ConsumeAllPages(url, resultConsumer, service = 'katsu') { }; return fetchFederation(url, service).then((data) => RecursiveQuery(data, 1)); -} +} */ // NB: I assign to lastPromise a bunch to keep track of whether or not we need to chain promises together // However, the linter really dislikes this, and assumes I want to put everything inside one useEffect? diff --git a/src/views/clinicalGenomic/widgets/sidebar.js b/src/views/clinicalGenomic/widgets/sidebar.js index 1e003393..6ac5a076 100644 --- a/src/views/clinicalGenomic/widgets/sidebar.js +++ b/src/views/clinicalGenomic/widgets/sidebar.js @@ -214,7 +214,7 @@ function GenomicsGroup(props) { const [selectedGenes, setSelectedGenes] = useState(''); const [startPos, setStartPos] = useState(0); const [endPos, setEndPos] = useState(0); - const [timeout, setNewTimeout] = useState(null); + const [_timeout, setNewTimeout] = useState(null); if (hide) { return <>;