Skip to content

Commit

Permalink
Fix: Hide empty "Files and Links" tab in patient view
Browse files Browse the repository at this point in the history
  • Loading branch information
Nelliney committed Aug 20, 2024
1 parent 4353fdc commit 232c3e8
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions src/pages/patientView/PatientViewPageTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -553,24 +553,25 @@ export function tabs(
</MSKTab>
);

tabs.push(
<MSKTab
key={4}
id={PatientViewPageTabs.FilesAndLinks}
linkText={RESOURCES_TAB_NAME}
hide={!pageComponent.shouldShowResources}
>
<div>
<ResourcesTab
store={pageComponent.patientViewPageStore}
sampleManager={
pageComponent.patientViewPageStore.sampleManager.result!
}
openResource={pageComponent.openResource}
/>
</div>
</MSKTab>
);
if (pageComponent.shouldShowResources)
tabs.push(
<MSKTab
key={4}
id={PatientViewPageTabs.FilesAndLinks}
linkText={RESOURCES_TAB_NAME}
>
<div>
<ResourcesTab
store={pageComponent.patientViewPageStore}
sampleManager={
pageComponent.patientViewPageStore.sampleManager
.result!
}
openResource={pageComponent.openResource}
/>
</div>
</MSKTab>
);

tabs.push(
<MSKTab
Expand Down

0 comments on commit 232c3e8

Please sign in to comment.