Skip to content

Commit

Permalink
Fix: handle 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 28, 2024
1 parent b861265 commit 2851e95
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions src/pages/patientView/PatientViewPageTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -552,25 +552,26 @@ 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}
hide={!pageComponent.shouldShowResources}
>
<div>
<ResourcesTab
store={pageComponent.patientViewPageStore}
sampleManager={
pageComponent.patientViewPageStore.sampleManager
.result!
}
openResource={pageComponent.openResource}
/>
</div>
</MSKTab>
);

tabs.push(
<MSKTab
Expand Down

0 comments on commit 2851e95

Please sign in to comment.