Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Austenem/CAT-793 unified datasets attribution #3551

Merged
merged 11 commits into from
Oct 2, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function AttributionAccordion() {
dataset: { creation_action, contributors, contacts },
} = useProcessedDatasetContext();

if (creation_action === 'Central Process' || contributors?.length === 0) {
if (creation_action === 'Central Process' || !contributors?.length) {
return null;
}

Expand Down
4 changes: 2 additions & 2 deletions context/app/static/js/pages/Dataset/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ function getProcessedDatasetSection({
const shouldDisplaySection = {
summary: true,
visualization: visualization || Boolean(conf && 'data' in conf && conf?.data),
files: Boolean(files?.length !== 0),
files: Boolean(files?.length),
analysis: Boolean(metadata?.dag_provenance_list),
attribution: creation_action !== 'Central Process' && Boolean(contributors?.length !== 0),
attribution: creation_action !== 'Central Process' && !!contributors?.length,
austenem marked this conversation as resolved.
Show resolved Hide resolved
};

const sectionsToDisplay = Object.entries(shouldDisplaySection).filter(([_k, v]) => v === true);
Expand Down
Loading