feat(MED-171): move sorting to loader to fix warning
This commit is contained in:
@@ -63,7 +63,20 @@ async function loadAccountMembers(
|
||||
throw error;
|
||||
}
|
||||
|
||||
return data ?? [];
|
||||
const members = data ?? [];
|
||||
|
||||
return members
|
||||
.sort((prev, next) => {
|
||||
if (prev.primary_owner_user_id === prev.user_id) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (prev.role_hierarchy_level < next.role_hierarchy_level) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
});
|
||||
}
|
||||
|
||||
export async function loadAccountMembersBenefitsUsage(
|
||||
|
||||
Reference in New Issue
Block a user