From ea2d740d1c246d8912a73964b045e0c9ad258ca3 Mon Sep 17 00:00:00 2001 From: Logan Allen Date: Wed, 3 Feb 2021 13:09:39 -0600 Subject: [PATCH] interface: fix group joining and display of share profile view --- pkg/interface/src/logic/lib/group.ts | 6 +++--- .../src/views/apps/chat/components/ShareProfile.js | 2 +- .../components/ChannelPopoverRoutes/ChannelPermissions.tsx | 2 +- pkg/interface/src/views/landscape/components/JoinGroup.tsx | 1 + 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/interface/src/logic/lib/group.ts b/pkg/interface/src/logic/lib/group.ts index 0bc3274f7..edc525d89 100644 --- a/pkg/interface/src/logic/lib/group.ts +++ b/pkg/interface/src/logic/lib/group.ts @@ -24,11 +24,11 @@ export function makeResource(ship: string, name: string) { export function isWriter(group: Group, resource: string) { const writers: Set | undefined = _.get( - group.tags, - ["graph", resource, "writers"], + group, + ["tags", "graph", resource, "writers"], undefined ); - const admins = group.tags?.role?.admin ?? new Set(); + const admins = group?.tags?.role?.admin ?? new Set(); if (_.isUndefined(writers)) { return true; } else { diff --git a/pkg/interface/src/views/apps/chat/components/ShareProfile.js b/pkg/interface/src/views/apps/chat/components/ShareProfile.js index 189f5847d..8f43f5504 100644 --- a/pkg/interface/src/views/apps/chat/components/ShareProfile.js +++ b/pkg/interface/src/views/apps/chat/components/ShareProfile.js @@ -83,7 +83,7 @@ export const ShareProfile = (props) => { p={1} alignItems="center" borderRadius={2} - backgroundColor={!props.our ? `#${uxToHex(props.our.color)}` : "#000000"}> + backgroundColor={!!props.our ? `#${uxToHex(props.our.color)}` : "#000000"}>