Skip to content

Commit

Permalink
[DT-962] Removes links from the access type column (#2713)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-rubenstein authored Nov 6, 2024
1 parent 948eea1 commit 19c11fa
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions src/components/data_search/DatasetSearchTableConstants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?
<Link href={dataset.url}>External to DUOS</Link> : 'External to DUOS';
} else if (dataset.accessManagement === 'open') {
accessType = dataset.url ? <Link href={dataset.url}>Open Access</Link> : 'Open Access';
} else {
accessType = dataset.dac?.dacEmail ? <Link
href={'mailto:' + dataset.dac.dacEmail}>{dataset.dac?.dacName}</Link> : 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',
Expand Down

0 comments on commit 19c11fa

Please sign in to comment.