From: Ajay Bura Date: Sat, 29 Jan 2022 08:17:37 +0000 (+0530) Subject: Make room permission component reusable for space settings X-Git-Tag: v1.8.0~151 X-Git-Url: https://git.wafflesoft.org/?a=commitdiff_plain;h=9d8efce26d2590fbc35048e3388f7eb1870c09f1;p=rainny.git Make room permission component reusable for space settings Signed-off-by: Ajay Bura --- 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}