mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-16 12:10:28 +03:00
Add GeneralSettings component
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
2b70a49e09
commit
d6b5f92d6c
4 changed files with 63 additions and 12 deletions
|
|
@ -61,6 +61,7 @@ function PeopleDrawer({ roomId }) {
|
|||
const PER_PAGE_MEMBER = 50;
|
||||
const mx = initMatrix.matrixClient;
|
||||
const room = mx.getRoom(roomId);
|
||||
const canInvite = room?.canInvite(mx.getUserId());
|
||||
|
||||
const [itemCount, setItemCount] = useState(PER_PAGE_MEMBER);
|
||||
const [membership, setMembership] = useState('join');
|
||||
|
|
@ -148,7 +149,7 @@ function PeopleDrawer({ roomId }) {
|
|||
<Text className="people-drawer__member-count" variant="b3">{`${room.getJoinedMemberCount()} members`}</Text>
|
||||
</Text>
|
||||
</TitleWrapper>
|
||||
<IconButton onClick={() => openInviteUser(roomId)} tooltip="Invite" src={AddUserIC} />
|
||||
<IconButton onClick={() => openInviteUser(roomId)} tooltip="Invite" src={AddUserIC} disabled={!canInvite} />
|
||||
</Header>
|
||||
<div className="people-drawer__content-wrapper">
|
||||
<div className="people-drawer__scrollable">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue