Merge branch 'emoji-rendering-hotfix' into 'develop'

Only render emoji selector in the dom when needed

See merge request soapbox-pub/soapbox-fe!131
This commit is contained in:
Alex Gleason 2020-08-05 21:04:41 +00:00
commit f07de93ee3
2 changed files with 6 additions and 2 deletions

View file

@ -367,7 +367,9 @@ class StatusActionBar extends ImmutablePureComponent {
onMouseLeave={this.handleLikeButtonLeave}
ref={this.setRef}
>
<EmojiSelector onReact={this.handleReactClick} visible={emojiSelectorVisible} />
{ emojiSelectorVisible &&
<EmojiSelector onReact={this.handleReactClick} visible={emojiSelectorVisible} />
}
<IconButton
className='status__action-bar-button star-icon'
animate

View file

@ -311,7 +311,9 @@ class ActionBar extends React.PureComponent {
onMouseLeave={this.handleLikeButtonLeave}
ref={this.setRef}
>
<EmojiSelector onReact={this.handleReactClick} visible={emojiSelectorVisible} />
{ emojiSelectorVisible &&
<EmojiSelector onReact={this.handleReactClick} visible={emojiSelectorVisible} />
}
<IconButton
className='star-icon'
animate