From 32f5cbbfaa96824a0d182efa74814c39f6ed6907 Mon Sep 17 00:00:00 2001 From: Evan-Leon Date: Mon, 23 Sep 2024 09:40:24 -0400 Subject: [PATCH 1/3] Start bug fixing for one fail on multi query --- .../src/features/search/results/CountOverTimeResults.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcweb/frontend/src/features/search/results/CountOverTimeResults.jsx b/mcweb/frontend/src/features/search/results/CountOverTimeResults.jsx index 0d403df7f..7acd96cf9 100644 --- a/mcweb/frontend/src/features/search/results/CountOverTimeResults.jsx +++ b/mcweb/frontend/src/features/search/results/CountOverTimeResults.jsx @@ -23,7 +23,7 @@ import { export default function CountOverTimeResults() { const dispatch = useDispatch(); const queryState = useSelector((state) => state.query); - + const multiQuery = (queryState.length > 1); const { platform, initialSearchTime, From 11b953698f71ac60ce5d4b7e1660a4610acd9716 Mon Sep 17 00:00:00 2001 From: Evan-Leon Date: Mon, 30 Sep 2024 10:21:32 -0400 Subject: [PATCH 2/3] Fix no data in multi-query --- mcweb/frontend/src/features/search/TabbedSearch.jsx | 2 ++ mcweb/frontend/src/features/search/results/SampleStories.jsx | 3 ++- mcweb/frontend/src/features/search/results/TopLanguages.jsx | 3 ++- mcweb/frontend/src/features/search/results/TopSources.jsx | 3 ++- mcweb/frontend/src/features/search/util/CSVDialog.jsx | 3 +++ .../src/features/search/util/prepareCountOverTimeData.js | 2 +- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/mcweb/frontend/src/features/search/TabbedSearch.jsx b/mcweb/frontend/src/features/search/TabbedSearch.jsx index fed307685..dbb154dea 100644 --- a/mcweb/frontend/src/features/search/TabbedSearch.jsx +++ b/mcweb/frontend/src/features/search/TabbedSearch.jsx @@ -166,6 +166,7 @@ export default function TabbedSearch() { {queryState.map((query, i) => ( {queryState.map((query, i) => ( + // eslint-disable-next-line react/no-array-index-key diff --git a/mcweb/frontend/src/features/search/results/SampleStories.jsx b/mcweb/frontend/src/features/search/results/SampleStories.jsx index acabe6233..646db5797 100644 --- a/mcweb/frontend/src/features/search/results/SampleStories.jsx +++ b/mcweb/frontend/src/features/search/results/SampleStories.jsx @@ -93,7 +93,8 @@ export default function SampleStories() { {data.map((results, i) => ( - + // eslint-disable-next-line react/no-array-index-key + {prepareLanguageData(data).map((results, i) => ( - + // eslint-disable-next-line react/no-array-index-key + {prepareSourceData(data, normalized).map((results, i) => ( - + // eslint-disable-next-line react/no-array-index-key + { const series = []; - const colors = getColors(queryState) + const colors = getColors(queryState); if (chartBy === DAY) { results.forEach((result, i) => { const preparedData = result.count_over_time.counts.map((r) => [ From 00af54db9c026b3f7fca617b4a3665f5cc9ccae1 Mon Sep 17 00:00:00 2001 From: Evan-Leon Date: Mon, 30 Sep 2024 11:44:16 -0400 Subject: [PATCH 3/3] Remove unused const --- .../src/features/search/results/CountOverTimeResults.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/mcweb/frontend/src/features/search/results/CountOverTimeResults.jsx b/mcweb/frontend/src/features/search/results/CountOverTimeResults.jsx index 7acd96cf9..f2578d88e 100644 --- a/mcweb/frontend/src/features/search/results/CountOverTimeResults.jsx +++ b/mcweb/frontend/src/features/search/results/CountOverTimeResults.jsx @@ -23,7 +23,6 @@ import { export default function CountOverTimeResults() { const dispatch = useDispatch(); const queryState = useSelector((state) => state.query); - const multiQuery = (queryState.length > 1); const { platform, initialSearchTime,