Disable redacting reactions if we don't have sufficient permissions (#8767)

This commit is contained in:
Šimon Brandner 2022-06-10 20:41:05 +02:00 committed by GitHub
parent 3f99f594de
commit 9b8b1d193e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 37 additions and 9 deletions

View file

@ -45,6 +45,7 @@ interface IProps {
onClick(emoji: IEmoji): void;
onMouseEnter(emoji: IEmoji): void;
onMouseLeave(emoji: IEmoji): void;
isEmojiDisabled?: (unicode: string) => boolean;
}
class Category extends React.PureComponent<IProps> {
@ -60,6 +61,7 @@ class Category extends React.PureComponent<IProps> {
onClick={onClick}
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
disabled={this.props.isEmojiDisabled?.(emoji.unicode)}
/>
))
}</div>);