Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/pages/workspace/WorkspaceMembersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,10 @@ function WorkspaceMembersPage({personalDetails, route, policy, currentUserPerson
};

const threeDotsMenuItems = useMemo(() => {
if (!isPolicyAdmin) {
return [];
}

const menuItems = [
{
icon: Expensicons.Table,
Expand Down Expand Up @@ -596,7 +600,7 @@ function WorkspaceMembersPage({personalDetails, route, policy, currentUserPerson
];

return menuItems;
}, [policyID, translate, isOffline]);
}, [policyID, translate, isOffline, isPolicyAdmin]);

const selectionModeHeader = selectionMode?.isEnabled && shouldUseNarrowLayout;

Expand All @@ -610,7 +614,7 @@ function WorkspaceMembersPage({personalDetails, route, policy, currentUserPerson
testID={WorkspaceMembersPage.displayName}
shouldShowLoading={false}
shouldShowOfflineIndicatorInWideScreen
shouldShowThreeDotsButton
shouldShowThreeDotsButton={isPolicyAdmin}
threeDotsMenuItems={threeDotsMenuItems}
threeDotsAnchorPosition={styles.threeDotsPopoverOffsetNoCloseButton(windowWidth)}
shouldShowNonAdmin
Expand Down