{}} size="large">
+
+ 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 {
memberIsAdmin,
@@ -22,6 +23,7 @@
useServerCall,
} from 'lib/utils/action-utils.js';
+import ChangeMemberRoleModal from './change-member-role-modal.react.js';
import css from './members-modal.css';
import Label from '../../../components/label.react.js';
import MenuItem from '../../../components/menu-item.react.js';
@@ -37,6 +39,7 @@
function ThreadMember(props: Props): React.Node {
const { memberInfo, threadInfo, setOpenMenu, isMenuOpen } = props;
+ const { pushModal } = useModalContext();
const userName = stringForUser(memberInfo);
const onMenuChange = React.useCallback(
@@ -64,7 +67,11 @@
[boundRemoveUsersFromThread, dispatchActionPromise, memberInfo, threadInfo],
);
- const onClickChangeRole = React.useCallback(() => {}, []);
+ const onClickChangeRole = React.useCallback(() => {
+ pushModal(
+