Skip to content

Commit

Permalink
fix: Don't show status bar when display status is set to false
Browse files Browse the repository at this point in the history
  • Loading branch information
iandebruin98 committed Nov 19, 2024
1 parent a719ea1 commit f012104
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/resource-detail/src/resource-detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,15 @@ function ResourceDetail({
<Image
src={src}
imageFooter={
<div>
<Paragraph className={`osc-resource-detail-content-item-status ${statusClasses}`}>
{resource.statuses
?.map((s: { name: string }) => s.name)
?.join(', ')}
</Paragraph>
</div>
(displayStatus && resource.statuses && resource.statuses.length > 0) && (
<div>
<Paragraph className={`osc-resource-detail-content-item-status ${statusClasses}`}>
{resource.statuses
?.map((s: { name: string }) => s.name)
?.join(', ')}
</Paragraph>
</div>
)
}
/>
);
Expand Down

0 comments on commit f012104

Please sign in to comment.