Introduce Membership type
This commit is contained in:
parent
3c6fd58628
commit
da99bad7b9
115 changed files with 582 additions and 526 deletions
|
@ -99,7 +99,7 @@ export const SpaceButton = <T extends keyof JSX.IntrinsicElements>({
|
|||
let notifBadge;
|
||||
if (spaceKey && notificationState) {
|
||||
let ariaLabel = _t("a11y_jump_first_unread_room");
|
||||
if (space?.getMyMembership() === "invite") {
|
||||
if (space?.getMyMembership() === Membership.Invite) {
|
||||
ariaLabel = _t("a11y|jump_first_invite");
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ export class SpaceItem extends React.PureComponent<IItemProps, IItemState> {
|
|||
hasSubSpaces: this.state.childSpaces?.length,
|
||||
});
|
||||
|
||||
const isInvite = space.getMyMembership() === "invite";
|
||||
const isInvite = space.getMyMembership() === Membership.Invite;
|
||||
|
||||
const notificationState = isInvite
|
||||
? StaticNotificationState.forSymbol("!", NotificationLevel.Highlight)
|
||||
|
@ -378,7 +378,9 @@ export class SpaceItem extends React.PureComponent<IItemProps, IItemState> {
|
|||
isNarrow={isPanelCollapsed}
|
||||
size={isNested ? "24px" : "32px"}
|
||||
onKeyDown={this.onKeyDown}
|
||||
ContextMenuComponent={this.props.space.getMyMembership() === "join" ? SpaceContextMenu : undefined}
|
||||
ContextMenuComponent={
|
||||
this.props.space.getMyMembership() === Membership.Join ? SpaceContextMenu : undefined
|
||||
}
|
||||
>
|
||||
{toggleCollapseButton}
|
||||
</SpaceButton>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue