From ea868b31799e56ec9c8ae410c5bf061d4feaf0f1 Mon Sep 17 00:00:00 2001 From: Oliver Date: Mon, 13 Oct 2025 13:08:49 +1100 Subject: [PATCH] [UI] About InvenTree Tweak (#10565) - Hide version entries without data --- .../components/modals/AboutInvenTreeModal.tsx | 44 ++++++++++--------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/src/frontend/src/components/modals/AboutInvenTreeModal.tsx b/src/frontend/src/components/modals/AboutInvenTreeModal.tsx index 806e868e51..56feea6e2c 100644 --- a/src/frontend/src/components/modals/AboutInvenTreeModal.tsx +++ b/src/frontend/src/components/modals/AboutInvenTreeModal.tsx @@ -68,27 +68,29 @@ const AboutContent = ({ }); function fillTable(lookup: AboutLookupRef[], data: any, alwaysLink = false) { - return lookup.map((map: AboutLookupRef, idx) => ( - - {map.title} - - - {alwaysLink ? ( - - {data[map.ref]} - - ) : map.link ? ( - - {data[map.ref]} - - ) : ( - data[map.ref] - )} - {map.copy && } - - - - )); + return lookup + .filter((entry: AboutLookupRef) => !!data[entry.ref]) + .map((entry: AboutLookupRef, idx) => ( + + {entry.title} + + + {alwaysLink ? ( + + {data[entry.ref]} + + ) : entry.link ? ( + + {data[entry.ref]} + + ) : ( + data[entry.ref] + )} + {entry.copy && } + + + + )); } /* renderer */ if (isLoading) return Loading;