From 9d8efce26d2590fbc35048e3388f7eb1870c09f1 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Sat, 29 Jan 2022 13:47:37 +0530 Subject: [PATCH] Make room permission component reusable for space settings Signed-off-by: Ajay Bura --- src/app/molecules/room-permissions/RoomPermissions.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/molecules/room-permissions/RoomPermissions.jsx b/src/app/molecules/room-permissions/RoomPermissions.jsx index c7a2eee..cd1ce01 100644 --- a/src/app/molecules/room-permissions/RoomPermissions.jsx +++ b/src/app/molecules/room-permissions/RoomPermissions.jsx @@ -218,11 +218,12 @@ function RoomPermissions({ roomId }) { ); }; + const permsGroups = room.isSpaceRoom() ? spacePermsGroups : roomPermsGroups; return (
{ - Object.keys(roomPermsGroups).map((groupKey) => { - const groupedPermKeys = roomPermsGroups[groupKey]; + Object.keys(permsGroups).map((groupKey) => { + const groupedPermKeys = permsGroups[groupKey]; return (
{groupKey}