only render emoji selector in the dom when needed

This commit is contained in:
Mary Kate 2020-08-05 15:53:30 -05:00
parent 19e3dc9ed3
commit 769a512445
2 changed files with 6 additions and 2 deletions

View file

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

View file

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