From 07c55b469327a9b9065ca3b9a9f2c7fa96f9ad2c Mon Sep 17 00:00:00 2001 From: jenny-s51 Date: Tue, 18 May 2021 10:47:21 -0400 Subject: [PATCH] fix format --- src/user/JoinGroupDialog.tsx | 40 ++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/user/JoinGroupDialog.tsx b/src/user/JoinGroupDialog.tsx index 73d18b551f..1e99134aeb 100644 --- a/src/user/JoinGroupDialog.tsx +++ b/src/user/JoinGroupDialog.tsx @@ -64,26 +64,26 @@ export const JoinGroupDialog = ({ async () => { const allGroups = await adminClient.groups.find(); - if (groupId) { - const group = await adminClient.groups.findOne({ id: groupId }); - return { group, groups: group.subGroups! }; - } else if (id) { - const existingUserGroups = await adminClient.users.listGroups({ - id, - }); - setJoinedGroups(existingUserGroups); - return { - groups: allGroups, - }; - } else - return { - groups: allGroups, - }; - }, - async ({ group: selectedGroup, groups }) => { - if (selectedGroup) { - setNavigation([...navigation, selectedGroup]); - } + if (groupId) { + const group = await adminClient.groups.findOne({ id: groupId }); + return { group, groups: group.subGroups! }; + } else if (id) { + const existingUserGroups = await adminClient.users.listGroups({ + id, + }); + setJoinedGroups(existingUserGroups); + return { + groups: allGroups, + }; + } else + return { + groups: allGroups, + }; + }, + async ({ group: selectedGroup, groups }) => { + if (selectedGroup) { + setNavigation([...navigation, selectedGroup]); + } groups.forEach((group: Group) => { group.checked = !!selectedRows.find((r) => r.id === group.id);