diff --git a/src/app/organisms/room/PeopleDrawer.jsx b/src/app/organisms/room/PeopleDrawer.jsx index 7cf9a59..098c450 100644 --- a/src/app/organisms/room/PeopleDrawer.jsx +++ b/src/app/organisms/room/PeopleDrawer.jsx @@ -17,6 +17,7 @@ import IconButton from '../../atoms/button/IconButton'; import Button from '../../atoms/button/Button'; import ScrollView from '../../atoms/scroll/ScrollView'; import Input from '../../atoms/input/Input'; +import SegmentedControl from '../../atoms/segmented-controls/SegmentedControls'; import PeopleSelector from '../../molecules/people-selector/PeopleSelector'; import AddUserIC from '../../../../public/res/ic/outlined/add-user.svg'; @@ -64,6 +65,7 @@ function PeopleDrawer({ roomId }) { const [itemCount, setItemCount] = useState(PER_PAGE_MEMBER); const [membership, setMembership] = useState('join'); + window.setMemberShip = setMembership; const [memberList, setMemberList] = useState([]); const [searchedMembers, setSearchedMembers] = useState(null); const searchRef = useRef(null); @@ -127,6 +129,10 @@ function PeopleDrawer({ roomId }) { setItemCount(PER_PAGE_MEMBER); asyncSearch.removeListener(asyncSearch.RESULT_SENT, handleSearchData); }; + }, [roomId, membership]); + + useEffect(() => { + setMembership('join'); }, [roomId]); const mList = searchedMembers !== null ? searchedMembers.data : memberList.slice(0, itemCount); @@ -145,6 +151,27 @@ function PeopleDrawer({ roomId }) {