Make room permission component reusable for space settings
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
parent
6d778ca223
commit
9d8efce26d
1 changed files with 3 additions and 2 deletions
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue