Make room permission component reusable for space settings

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura 2022-01-29 13:47:37 +05:30
parent 6d778ca223
commit 9d8efce26d

View file

@ -218,11 +218,12 @@ function RoomPermissions({ roomId }) {
); );
}; };
const permsGroups = room.isSpaceRoom() ? spacePermsGroups : roomPermsGroups;
return ( return (
<div className="room-permissions"> <div className="room-permissions">
{ {
Object.keys(roomPermsGroups).map((groupKey) => { Object.keys(permsGroups).map((groupKey) => {
const groupedPermKeys = roomPermsGroups[groupKey]; const groupedPermKeys = permsGroups[groupKey];
return ( return (
<div className="room-permissions__card" key={groupKey}> <div className="room-permissions__card" key={groupKey}>
<MenuHeader>{groupKey}</MenuHeader> <MenuHeader>{groupKey}</MenuHeader>