From 19c11fad343b80bb145b8c2b7f984cfe73922cf7 Mon Sep 17 00:00:00 2001 From: Sky Rubenstein Date: Wed, 6 Nov 2024 16:41:09 -0500 Subject: [PATCH] [DT-962] Removes links from the access type column (#2713) --- .../DatasetSearchTableConstants.tsx | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/src/components/data_search/DatasetSearchTableConstants.tsx b/src/components/data_search/DatasetSearchTableConstants.tsx index 7428e497c..c61bda76f 100644 --- a/src/components/data_search/DatasetSearchTableConstants.tsx +++ b/src/components/data_search/DatasetSearchTableConstants.tsx @@ -327,25 +327,16 @@ export const makeDatasetTableHeader = (datasets: DatasetTerm[], selected: number label: 'Access Type', sortable: true, cellStyle: makeHeaderStyle(cellWidths.accessType), - cellDataFn: (dataset: DatasetTerm) => { - let accessType; - if (dataset.accessManagement === 'external') { - accessType = dataset.url ? - External to DUOS : 'External to DUOS'; - } else if (dataset.accessManagement === 'open') { - accessType = dataset.url ? Open Access : 'Open Access'; - } else { - accessType = dataset.dac?.dacEmail ? {dataset.dac?.dacName} : dataset.dac?.dacName; - } - return { - data: accessType, - value: dataset.accessManagement, - id: `${dataset.datasetId}-participant-count`, - style: makeRowStyle(cellWidths.accessType), - label: `Access Type for dataset ${dataset.datasetId}: ${dataset.accessManagement}` - }; - } + cellDataFn: (dataset: DatasetTerm) => ({ + data: dataset.accessManagement === 'external' ? + 'External to DUOS' : + dataset.accessManagement === 'open' ? + 'Open Access' : dataset.dac?.dacName, + value: dataset.accessManagement, + id: `${dataset.datasetId}-participant-count`, + style: makeRowStyle(cellWidths.accessType), + label: `Access Type for dataset ${dataset.datasetId}: ${dataset.accessManagement}` + }) }, { label: 'Data Type',