From 07f04bb8dd34e0eeff23a846b09c5f16b247793a Mon Sep 17 00:00:00 2001 From: Jason Hwee <1216418+hweej@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:35:52 -0400 Subject: [PATCH] Remove unnecessary Map instantiation --- src/pages/studyView/resources/FilesAndLinks.tsx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/pages/studyView/resources/FilesAndLinks.tsx b/src/pages/studyView/resources/FilesAndLinks.tsx index 2f9ddb75404..bc619c96984 100644 --- a/src/pages/studyView/resources/FilesAndLinks.tsx +++ b/src/pages/studyView/resources/FilesAndLinks.tsx @@ -14,7 +14,6 @@ import { getSampleViewUrlWithPathname, getPatientViewUrlWithPathname, } from 'shared/api/urls'; -import { getAllClinicalDataByStudyViewFilter } from '../StudyViewUtils'; import { StudyViewPageStore } from 'pages/studyView/StudyViewPageStore'; import { isUrl, remoteData } from 'cbioportal-frontend-commons'; import { makeObservable, observable, computed } from 'mobx'; @@ -116,23 +115,14 @@ async function fetchFilesLinksData( sortDirection: 'asc' | 'desc' | undefined, recordLimit: number ) { - const studyClinicalDataResponse = await getAllClinicalDataByStudyViewFilter( - filters, - searchTerm, - sortAttributeId, - sortDirection, - recordLimit, - 0 - ); - const selectedStudyIds = [ ...new Set(selectedSamples.map(item => item.studyId)), ]; // sampleIds (+patientIds) for the selectedSamples const selectedIds = new Map([ - ...new Map(selectedSamples.map(item => [item.sampleId, item.studyId])), - ...new Map(selectedSamples.map(item => [item.patientId, item.studyId])), + ...selectedSamples.map(item => [item.sampleId, item.studyId] as const), + ...selectedSamples.map(item => [item.patientId, item.studyId] as const), ]); // Fetch resources for entire study