From e39c7bd8fdf0a2adfe5834edde61542b4840b84c Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Thu, 9 Apr 2026 23:32:15 -0400 Subject: [PATCH] order mention services --- components/Mention.tsx | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/components/Mention.tsx b/components/Mention.tsx index 62fa84c2..0f3ca2e2 100644 --- a/components/Mention.tsx +++ b/components/Mention.tsx @@ -873,20 +873,24 @@ function useMentionServices(enabled: boolean): Array { async () => { try { const result = await callRPC(`get_user_mention_services`, {}); - return result.result.services.map( - (s: { - uri: string; - name: string; - description?: string; - canBeScopedToDid?: boolean; - }) => ({ - type: "service" as const, - serviceUri: s.uri, - name: s.name, - description: s.description, - canBeScopedToDid: s.canBeScopedToDid, - }), - ); + return result.result.services + .map( + (s: { + uri: string; + name: string; + description?: string; + canBeScopedToDid?: boolean; + }) => ({ + type: "service" as const, + serviceUri: s.uri, + name: s.name, + description: s.description, + canBeScopedToDid: s.canBeScopedToDid, + }), + ) + .sort((a: { name: string }, b: { name: string }) => + a.name.localeCompare(b.name, undefined, { sensitivity: "base" }), + ); } catch { return EMPTY_SERVICES; } -- 2.51.2