diff --git a/src/app/atoms/segmented-controls/SegmentedControls.jsx b/src/app/atoms/segmented-controls/SegmentedControls.jsx index 2faaf2b..1d54dd0 100644 --- a/src/app/atoms/segmented-controls/SegmentedControls.jsx +++ b/src/app/atoms/segmented-controls/SegmentedControls.jsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import './SegmentedControls.scss'; @@ -17,6 +17,10 @@ function SegmentedControls({ onSelect(segmentIndex); } + useEffect(() => { + setSelect(selected); + }, [selected]); + return (
{ diff --git a/src/app/organisms/room/PeopleDrawer.jsx b/src/app/organisms/room/PeopleDrawer.jsx index 098c450..050d8b6 100644 --- a/src/app/organisms/room/PeopleDrawer.jsx +++ b/src/app/organisms/room/PeopleDrawer.jsx @@ -65,7 +65,6 @@ 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);