Fixing ShareBoard users ordering (#2602)

This commit is contained in:
Jesús Espino 2022-03-24 18:12:31 +01:00 committed by GitHub
parent e82305de56
commit 1a5299044f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -272,17 +272,15 @@ export default function ShareBoardDialog(props: Props): JSX.Element {
<div className='user-items'> <div className='user-items'>
<TeamPermissionsRow/> <TeamPermissionsRow/>
{Object.values(members).map((member) => { {boardUsers.map((user) => {
const user = boardUsers.find((u) => u.id === member.userId) if (!members[user.id]) {
if (!user) {
return null return null
} }
return ( return (
<UserPermissionsRow <UserPermissionsRow
key={user.id} key={user.id}
user={user} user={user}
member={member} member={members[user.id]}
onDeleteBoardMember={onDeleteBoardMember} onDeleteBoardMember={onDeleteBoardMember}
onUpdateBoardMember={onUpdateBoardMember} onUpdateBoardMember={onUpdateBoardMember}
isMe={user.id === me?.id} isMe={user.id === me?.id}