Skip to content

Commit

Permalink
Change file and links name to resource displayName (#5061)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hweej authored Dec 30, 2024
1 parent 2c5ff74 commit 3a893e1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/pages/studyView/StudyViewPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
>
<div>
Expand Down

0 comments on commit 3a893e1

Please sign in to comment.