Disable context menu on space invite tiles as no options sensibly work

This commit is contained in:
Michael Telatynski 2021-04-22 11:24:52 +01:00
parent 7efd4a43a5
commit a51aeaa04d

View file

@ -85,6 +85,7 @@ export class SpaceItem extends React.PureComponent<IItemProps, IItemState> {
}
private onContextMenu = (ev: React.MouseEvent) => {
if (this.props.space.getMyMembership() !== "join") return;
ev.preventDefault();
ev.stopPropagation();
this.setState({
@ -187,6 +188,8 @@ export class SpaceItem extends React.PureComponent<IItemProps, IItemState> {
};
private renderContextMenu(): React.ReactElement {
if (this.props.space.getMyMembership() !== "join") return null;
let contextMenu = null;
if (this.state.contextMenuPosition) {
const userId = this.context.getUserId();