diff --git a/web/chat/member-list-sidebar/member-list-sidebar-header.react.js b/web/chat/member-list-sidebar/member-list-sidebar-header.react.js --- a/web/chat/member-list-sidebar/member-list-sidebar-header.react.js +++ b/web/chat/member-list-sidebar/member-list-sidebar-header.react.js @@ -8,7 +8,7 @@ import css from './member-list-sidebar-header.css'; import { useMemberListSidebarContext } from './member-list-sidebar-provider.react.js'; import AddButton from '../../components/add-button.react.js'; -import { AddMembersModalWrapper } from '../../modals/threads/members/add-members-modal.react.js'; +import { AddMembersModal } from '../../modals/threads/members/add-members-modal.react.js'; type Props = { +threadID: string, @@ -20,9 +20,7 @@ const { pushModal, popModal } = useModalContext(); const onClickAddButton = React.useCallback(() => { - pushModal( - , - ); + pushModal(); }, [popModal, pushModal, threadID]); const { setShowMemberListSidebar } = useMemberListSidebarContext(); diff --git a/web/modals/threads/members/add-members-modal.react.js b/web/modals/threads/members/add-members-modal.react.js --- a/web/modals/threads/members/add-members-modal.react.js +++ b/web/modals/threads/members/add-members-modal.react.js @@ -23,7 +23,7 @@ +threadID: string, }; -function AddMembersModalContent(props: ContentProps): React.Node { +function AddMembersList(props: ContentProps): React.Node { const { searchText, threadID } = props; const { userInfos, sortedUsersWithENSNames } = useAddMembersListUserInfos({ @@ -31,8 +31,8 @@ searchText, }); - return ( -
+ const addMembersList = React.useMemo( + () => (
0} @@ -40,8 +40,11 @@ sortedUsersWithENSNames={sortedUsersWithENSNames} />
-
+ ), + [searchText.length, sortedUsersWithENSNames, userInfos], ); + + return addMembersList; } type Props = { @@ -49,7 +52,7 @@ +onClose: () => void, }; -function AddMembersModal(props: Props): React.Node { +function AddMembersModalContent(props: Props): React.Node { const { threadID, onClose } = props; const { pendingUsersToAdd } = useAddUsersListContext(); @@ -87,9 +90,9 @@ [addUsers, pendingUsersToAdd.size], ); - const addMembersModalContent = React.useCallback( + const addMembersList = React.useCallback( (searchText: string) => ( - + ), [threadID], ); @@ -99,22 +102,22 @@ name="Add members" searchPlaceholder="Search members" onClose={onClose} - size="fit-content" + size="large" primaryButton={primaryButton} > - {addMembersModalContent} + {addMembersList} ); } -function AddMembersModalWrapper(props: Props): React.Node { +function AddMembersModal(props: Props): React.Node { const { threadID, onClose } = props; return ( - + ); } -export { AddMembersModalWrapper, AddMembersModalContent }; +export { AddMembersModal, AddMembersList }; diff --git a/web/modals/threads/members/members-modal.css b/web/modals/threads/members/members-modal.css --- a/web/modals/threads/members/members-modal.css +++ b/web/modals/threads/members/members-modal.css @@ -60,14 +60,6 @@ text-align: center; } -div.addMembersContent { - display: flex; - flex-direction: column; - overflow: auto; - color: var(--fg); - height: 617px; -} - div.addMembersPendingList { display: flex; flex-direction: row; @@ -77,6 +69,9 @@ } div.addMembersListContainer { + display: flex; + flex-direction: column; + color: var(--text-background-primary-default); overflow: auto; flex: 1; } diff --git a/web/modals/threads/members/members-modal.react.js b/web/modals/threads/members/members-modal.react.js --- a/web/modals/threads/members/members-modal.react.js +++ b/web/modals/threads/members/members-modal.react.js @@ -13,7 +13,7 @@ import { threadPermissions } from 'lib/types/thread-permission-types.js'; import { useRolesFromCommunityThreadInfo } from 'lib/utils/role-utils.js'; -import { AddMembersModalWrapper } from './add-members-modal.react.js'; +import { AddMembersModal } from './add-members-modal.react.js'; import ThreadMembersList from './members-list.react.js'; import css from './members-modal.css'; import Button from '../../../components/button.react.js'; @@ -90,9 +90,7 @@ const { pushModal, popModal } = useModalContext(); const onClickAddMembers = React.useCallback(() => { - pushModal( - , - ); + pushModal(); }, [popModal, pushModal, threadID]); const canAddMembers = threadHasPermission( diff --git a/web/sidebar/community-creation/community-creation-members-modal.react.js b/web/sidebar/community-creation/community-creation-members-modal.react.js --- a/web/sidebar/community-creation/community-creation-members-modal.react.js +++ b/web/sidebar/community-creation/community-creation-members-modal.react.js @@ -6,7 +6,7 @@ import css from './community-creation-members-modal.css'; import Search from '../../components/search.react.js'; import Modal from '../../modals/modal.react.js'; -import { AddMembersModalContent } from '../../modals/threads/members/add-members-modal.react.js'; +import { AddMembersList } from '../../modals/threads/members/add-members-modal.react.js'; type Props = { +threadID: string, @@ -30,7 +30,7 @@ searchText={searchText} placeholder="Search members" /> - + );