From 915c8a3501551fdccf786d0c34dc01107d873ce0 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 26 Jun 2026 14:42:13 +0200 Subject: [PATCH] fix: show app first in add item modal (#6087) --- .../src/components/board/items/item-select-modal.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/nextjs/src/components/board/items/item-select-modal.tsx b/apps/nextjs/src/components/board/items/item-select-modal.tsx index 726f135fa..2ac349c6d 100644 --- a/apps/nextjs/src/components/board/items/item-select-modal.tsx +++ b/apps/nextjs/src/components/board/items/item-select-modal.tsx @@ -41,7 +41,12 @@ export const ItemSelectModal = createModal(({ actions }) => { name: t(`widget.${kind}.name`), description: t(`widget.${kind}.description`), })) - .sort((itemA, itemB) => itemA.name.localeCompare(itemB.name)), + .sort((itemA, itemB) => { + if (itemA.kind === "app") return -1; + if (itemB.kind === "app") return 1; + + return itemA.name.localeCompare(itemB.name); + }), [t], );