From 3a893e1d08138ca727266874deea137a2f2cd8be Mon Sep 17 00:00:00 2001 From: Jason Hwee <1216418+hweej@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:31:35 -0500 Subject: [PATCH] Change file and links name to resource displayName (#5061) Adds a condition to the link text where if all resources are of the same type, then rename the Files & Links tab to the resourceDefinition displayName --- src/pages/studyView/StudyViewPage.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/pages/studyView/StudyViewPage.tsx b/src/pages/studyView/StudyViewPage.tsx index 6d2005b6d86..c99856eca9b 100644 --- a/src/pages/studyView/StudyViewPage.tsx +++ b/src/pages/studyView/StudyViewPage.tsx @@ -723,7 +723,13 @@ export default class StudyViewPage extends React.Component< id={ StudyViewPageTabKeyEnum.FILES_AND_LINKS } - linkText={RESOURCES_TAB_NAME} + linkText={ + this.store.resourceDefinitions + .result?.length == 1 + ? this.store.resourceDefinitions + .result[0].displayName + : RESOURCES_TAB_NAME + } hide={!this.shouldShowResources} >