fix: Update GroupProfile to read from properties over deprecated info aspect (#4475)

This commit is contained in:
darapuk 2022-03-24 12:46:58 -07:00 committed by GitHub
parent 1a20f76225
commit c9b40ec1ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 4 deletions

View File

@ -89,11 +89,20 @@ export default function GroupProfile() {
// Side bar data // Side bar data
const sideBarData = { const sideBarData = {
photoUrl: undefined, photoUrl: undefined,
avatarName: data?.corpGroup?.info?.displayName || data?.corpGroup?.name, avatarName:
name: data?.corpGroup?.info?.displayName || data?.corpGroup?.name || undefined, data?.corpGroup?.properties?.displayName ||
email: data?.corpGroup?.editableProperties?.email || undefined, data?.corpGroup?.name ||
data?.corpGroup?.info?.displayName ||
undefined,
name:
data?.corpGroup?.properties?.displayName ||
data?.corpGroup?.name ||
data?.corpGroup?.info?.displayName ||
undefined,
email: data?.corpGroup?.editableProperties?.email || data?.corpGroup?.properties?.email || undefined,
slack: data?.corpGroup?.editableProperties?.slack || undefined, slack: data?.corpGroup?.editableProperties?.slack || undefined,
aboutText: data?.corpGroup?.editableProperties?.description || undefined, aboutText:
data?.corpGroup?.editableProperties?.description || data?.corpGroup?.properties?.description || undefined,
groupMemberRelationships: groupMemberRelationships as EntityRelationshipsResult, groupMemberRelationships: groupMemberRelationships as EntityRelationshipsResult,
groupOwnerShip: data?.corpGroup?.ownership as Ownership, groupOwnerShip: data?.corpGroup?.ownership as Ownership,
urn, urn,

View File

@ -13,6 +13,11 @@ query getGroup($urn: String!, $membersCount: Int!) {
slack slack
email email
} }
properties {
displayName
description
email
}
ownership { ownership {
...ownershipFields ...ownershipFields
} }