From c87a783f0ca38be1fca52978e4feb203b3861c1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Garn=C3=A6s?= Date: Tue, 9 Jul 2024 15:04:48 +0200 Subject: [PATCH] Conditionally render material type in selectable lists 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. --- .../selectable-material/selectable-material.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/apps/loan-list/materials/selectable-material/selectable-material.tsx b/src/apps/loan-list/materials/selectable-material/selectable-material.tsx index af2289a8b1..6e38800959 100644 --- a/src/apps/loan-list/materials/selectable-material/selectable-material.tsx +++ b/src/apps/loan-list/materials/selectable-material/selectable-material.tsx @@ -109,11 +109,13 @@ const SelectableMaterial: FC = ({ role="button" tabIndex={0} > -
-
- {materialType} + {materialType && ( +
+
+ {materialType} +
-
+ )} {statusBadgeComponentMobile || null}

{title}