+
+ Members can only be assigned to one role at a time. Changing a
+ member’s role will replace their previously assigned role.
+
+
+
+
+
+
{memberInfo.username}
+
+
+ );
+}
+
+export default ChangeMemberRoleModal;
diff --git a/web/modals/threads/members/member.react.js b/web/modals/threads/members/member.react.js
--- a/web/modals/threads/members/member.react.js
+++ b/web/modals/threads/members/member.react.js
@@ -4,6 +4,7 @@
import * as React from 'react';
import { removeUsersFromThread } from 'lib/actions/thread-actions.js';
+import { useModalContext } from 'lib/components/modal-provider.react.js';
import SWMansionIcon from 'lib/components/SWMansionIcon.react.js';
import {
removeMemberFromThread,
@@ -20,6 +21,7 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import ChangeMemberRoleModal from './change-member-role-modal.react.js';
import css from './members-modal.css';
import UserAvatar from '../../../avatars/user-avatar.react.js';
import Label from '../../../components/label.react.js';
@@ -35,6 +37,7 @@
function ThreadMember(props: Props): React.Node {
const { memberInfo, threadInfo, setOpenMenu, isMenuOpen } = props;
+ const { pushModal } = useModalContext();
const userName = stringForUser(memberInfo);
const { roles } = threadInfo;
const { role } = memberInfo;
@@ -64,7 +67,11 @@
[boundRemoveUsersFromThread, dispatchActionPromise, memberInfo, threadInfo],
);
- const onClickChangeRole = React.useCallback(() => {}, []);
+ const onClickChangeRole = React.useCallback(() => {
+ pushModal(
+