mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 22:33:06 +03:00
SidebarListHeader: look in %groups not %contacts assocs
Fixes urbit/landscape#405
This commit is contained in:
parent
ba57ad2222
commit
a9d2381d0e
@ -42,9 +42,9 @@ export function SidebarListHeader(props: {
|
||||
);
|
||||
|
||||
const groupPath = getGroupFromWorkspace(props.workspace);
|
||||
const role = props.groups?.[groupPath] ? roleForShip(props.groups[groupPath], window.ship) : undefined;
|
||||
const role = groupPath && props.groups?.[groupPath] ? roleForShip(props.groups[groupPath], window.ship) : undefined;
|
||||
const memberMetadata =
|
||||
groupPath ? props.associations.contacts?.[groupPath].metadata.vip === 'member-metadata' : false;
|
||||
groupPath ? props.associations.groups?.[groupPath].metadata.vip === 'member-metadata' : false;
|
||||
|
||||
const isAdmin = memberMetadata || (role === "admin") || (props.workspace?.type === 'home') || (props.workspace?.type === "messages");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user