From 4f9e588494b9c727951473528fa86544105baf9e Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Fri, 7 Mar 2025 11:51:04 +0000 Subject: [PATCH] sort workspace list --- .../src/ee/components/joined-workspaces.tsx | 54 ++++++++++--------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/apps/client/src/ee/components/joined-workspaces.tsx b/apps/client/src/ee/components/joined-workspaces.tsx index 7129aa00..4029a501 100644 --- a/apps/client/src/ee/components/joined-workspaces.tsx +++ b/apps/client/src/ee/components/joined-workspaces.tsx @@ -15,35 +15,37 @@ export default function JoinedWorkspaces() { return ( <> - {data.map((workspace: Partial, index) => ( - - - + {data + .sort((a, b) => a.name.localeCompare(b.name)) + .map((workspace: Partial, index) => ( + + + -
- - {workspace?.name} - +
+ + {workspace?.name} + - - {getHostnameUrl(workspace?.hostname)?.split("//")[1]} - -
+ + {getHostnameUrl(workspace?.hostname)?.split("//")[1]} + +
- -
-
- ))} + +
+
+ ))} ); }