fix: workspace members reordering (#1978)

This commit is contained in:
sriram veeraghanta 2023-08-25 13:38:50 +05:30 committed by GitHub
parent 1530993b84
commit 0525e7d6b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);