Skip to content

Commit

Permalink
fix: user list sort order
Browse files Browse the repository at this point in the history
Signed-off-by: Colton Wolkins (Laptop) <[email protected]>
  • Loading branch information
TheTechmage committed Apr 2, 2024
1 parent 015f957 commit 103ffa5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/app/wyvern/user-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ function renderUserList(servers) {
let ar = getHoistRole(a.roles);
let br = getHoistRole(b.roles);
if (!ar || !br) {
if(ar)
if (ar?.hoist)
return -1;
if(br)
else if (br?.hoist)
return 1;
if(a.name > b.name)
return 1;
Expand All @@ -112,10 +112,6 @@ function renderUserList(servers) {
if (ar.id > br.id)
return 1;
}
else if (ar?.hoist)
return -1;
else if (br?.hoist)
return 1;
if(a.name > b.name)
return 1;
if(b.name > a.name)
Expand All @@ -130,7 +126,7 @@ function renderUserList(servers) {
elements.push(<div key="role-empty" className="content-center text-center"><span>Online</span></div>);
seenHoistedRoles.push(-1);
}
elements.push(<Server key={server.id} server={server} />);
elements.push(<div dataUserId={server.id}><Server key={server.id} server={server} /></div>);
})
return elements;
}
Expand Down

0 comments on commit 103ffa5

Please sign in to comment.