diff --git a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/share-modal-body.tsx b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/share-modal-body.tsx
index 17de897e29..aabb6f3628 100644
--- a/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/share-modal-body.tsx
+++ b/services/web/frontend/js/features/share-project-modal/components/restricted-link-sharing/share-modal-body.tsx
@@ -72,6 +72,16 @@ export default function ShareModalBody() {
)
}, [features, isProjectOwner, members])
+ const sortedMembers = useMemo(() => {
+ return [
+ ...members.filter(member => member.privileges === 'readAndWrite'),
+ ...members.filter(member => member.pendingEditor),
+ ...members.filter(
+ member => !member.pendingEditor && member.privileges !== 'readAndWrite'
+ ),
+ ]
+ }, [members])
+
return (
<>
{isProjectOwner ? (
@@ -88,7 +98,7 @@ export default function ShareModalBody() {
- {members.map(member =>
+ {sortedMembers.map(member =>
isProjectOwner ? (