Skip to content

Commit

Permalink
Conditionally render material type in selectable lists
Browse files Browse the repository at this point in the history
When using basic details from FBS the material type will not be
provided at the moment.

As such we will not have anything to render. Instead of rendering a
blank box as we do now we omit the element entirely.

No workarounds are required to ensure that the layout stays
consistent.
  • Loading branch information
kasperg committed Jul 9, 2024
1 parent b8647b9 commit c87a783
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,13 @@ const SelectableMaterial: FC<SelectableMaterialProps & MaterialProps> = ({
role="button"
tabIndex={0}
>
<div className="list-materials__content-status">
<div className="status-label status-label--outline ">
{materialType}
{materialType && (
<div className="list-materials__content-status">
<div className="status-label status-label--outline ">
{materialType}
</div>
</div>
</div>
)}
{statusBadgeComponentMobile || null}
<p className="list-materials__content__header mt-8" lang={lang || ""}>
{title}
Expand Down

0 comments on commit c87a783

Please sign in to comment.