GroupsPane: show channel length

This commit is contained in:
Matilde Park 2021-02-08 22:05:59 -05:00
parent 0f62a951dc
commit 182eb5c7fe

View File

@ -192,12 +192,15 @@ export function GroupsPane(props: GroupsPaneProps) {
path={relativePath("")}
render={(routeProps) => {
const hasDescription = groupAssociation?.metadata?.description;
const channelCount = Object.keys(props?.associations?.graph ?? {}).filter(e => {
return props?.associations?.graph?.[e]?.['group'] === groupPath;
}).length;
let summary: ReactNode;
if(groupAssociation?.group) {
const memberCount = props.groups[groupAssociation.group].members.size;
summary = <GroupSummary
memberCount={memberCount}
channelCount={0}
channelCount={channelCount}
metadata={groupAssociation.metadata}
/>
} else {