diff --git a/web/invite-links/invite-links-menu.css b/web/invite-links/invite-links-menu.css
--- a/web/invite-links/invite-links-menu.css
+++ b/web/invite-links/invite-links-menu.css
@@ -1,3 +1,4 @@
.container {
color: var(--menu-color-light);
+ width: 24px;
}
diff --git a/web/invite-links/invite-links-menu.react.js b/web/invite-links/invite-links-menu.react.js
--- a/web/invite-links/invite-links-menu.react.js
+++ b/web/invite-links/invite-links-menu.react.js
@@ -5,13 +5,17 @@
import { useModalContext } from 'lib/components/modal-provider.react.js';
import SWMansionIcon from 'lib/components/SWMansionIcon.react.js';
import { primaryInviteLinksSelector } from 'lib/selectors/invite-links-selectors.js';
+import { threadInfoSelector } from 'lib/selectors/thread-selectors.js';
+import { threadHasPermission } from 'lib/shared/thread-utils.js';
import type { InviteLink } from 'lib/types/link-types.js';
+import { threadPermissions } from 'lib/types/thread-permission-types.js';
import css from './invite-links-menu.css';
import ViewInviteLinkModal from './view-invite-link-modal.react.js';
import MenuItem from '../components/menu-item.react.js';
import Menu from '../components/menu.react.js';
import { useSelector } from '../redux/redux-utils.js';
+import { AddLink } from '../vectors.react.js';
type Props = {
+communityID: string,
@@ -24,6 +28,14 @@
];
const { pushModal } = useModalContext();
+ const community = useSelector(
+ state => threadInfoSelector(state)[communityID],
+ );
+ const canManageLinks = threadHasPermission(
+ community,
+ threadPermissions.MANAGE_INVITE_LINKS,
+ );
+
const openViewInviteLinkModal = React.useCallback(() => {
if (!inviteLink) {
return;
@@ -31,19 +43,58 @@
pushModal(