From 0525e7d6b3f6cfc91af73d70a4ffe92ff322c493 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Fri, 25 Aug 2023 13:38:50 +0530 Subject: [PATCH] fix: workspace members reordering (#1978) --- .../[workspaceSlug]/settings/members.tsx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/app/pages/[workspaceSlug]/settings/members.tsx b/apps/app/pages/[workspaceSlug]/settings/members.tsx index 0801c84b7..9090e1c17 100644 --- a/apps/app/pages/[workspaceSlug]/settings/members.tsx +++ b/apps/app/pages/[workspaceSlug]/settings/members.tsx @@ -69,19 +69,6 @@ const MembersSettings: NextPage = () => { ); const members = [ - ...(workspaceMembers?.map((item) => ({ - id: item.id, - memberId: item.member?.id, - avatar: item.member?.avatar, - first_name: item.member?.first_name, - last_name: item.member?.last_name, - email: item.member?.email, - display_name: item.member?.display_name, - role: item.role, - status: true, - member: true, - accountCreated: true, - })) || []), ...(workspaceInvitations?.map((item) => ({ id: item.id, memberId: item.id, @@ -95,6 +82,19 @@ const MembersSettings: NextPage = () => { member: false, accountCreated: item?.accepted ? false : true, })) || []), + ...(workspaceMembers?.map((item) => ({ + id: item.id, + memberId: item.member?.id, + avatar: item.member?.avatar, + first_name: item.member?.first_name, + last_name: item.member?.last_name, + email: item.member?.email, + display_name: item.member?.display_name, + role: item.role, + status: true, + member: true, + accountCreated: true, + })) || []), ]; const currentUser = workspaceMembers?.find((item) => item.member?.id === user?.id);