From 58133d1345947b4eed1bc75a342a82a8200c5705 Mon Sep 17 00:00:00 2001 From: Ruben Thoms Date: Tue, 17 Sep 2024 12:54:20 +0200 Subject: [PATCH] Minor adjustments --- frontend/src/lib/components/SortableList/sortableListItem.tsx | 4 +++- frontend/src/modules/MyModule2/settings.tsx | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/lib/components/SortableList/sortableListItem.tsx b/frontend/src/lib/components/SortableList/sortableListItem.tsx index 3610db042..ea8bc0a73 100644 --- a/frontend/src/lib/components/SortableList/sortableListItem.tsx +++ b/frontend/src/lib/components/SortableList/sortableListItem.tsx @@ -69,7 +69,9 @@ export function SortableListItem(props: SortableListItemProps): React.ReactNode
)} -
{props.children}
+ {props.children !== undefined && ( +
{props.children}
+ )} {isHovered && sortableListContext.hoveredArea === HoveredArea.BOTTOM && } diff --git a/frontend/src/modules/MyModule2/settings.tsx b/frontend/src/modules/MyModule2/settings.tsx index eac520620..aaa009cfc 100644 --- a/frontend/src/modules/MyModule2/settings.tsx +++ b/frontend/src/modules/MyModule2/settings.tsx @@ -141,11 +141,11 @@ export function Settings(): React.ReactNode { ); function makeChildren(items: Item[]): React.ReactElement[] { - return items.map((item) => { + return items.map((item, idx) => { if (item.type === "item") { return ( - {item.title} + {idx % 2 === 0 ? item.title : undefined} ); } else {