From 0dd021e17dd42aea1cef5e3021591b4a3784f6c3 Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Fri, 26 Jun 2026 14:40:37 +0200 Subject: [PATCH] fix: show app first in add item modal --- .../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], );