diff --git a/app/javascript/gabsocial/components/status_action_bar.js b/app/javascript/gabsocial/components/status_action_bar.js index cbe45695..5568bf96 100644 --- a/app/javascript/gabsocial/components/status_action_bar.js +++ b/app/javascript/gabsocial/components/status_action_bar.js @@ -13,6 +13,10 @@ class StatusActionBar extends ImmutablePureComponent { updateOnProps = ['status'] + handleShareClick = () => { + this.props.onShare(this.shareButton, this.props.status) + } + handleReplyClick = () => { this.props.onReply(this.props.status, null, true) } @@ -37,8 +41,8 @@ class StatusActionBar extends ImmutablePureComponent { this.props.onOpenReposts(this.props.status) } - setRepostButton = (n) => { - this.repostButton = n + setShareButton = (n) => { + this.shareButton = n } render() { @@ -164,7 +168,6 @@ class StatusActionBar extends ImmutablePureComponent { icon={!publicStatus ? 'lock' : 'repost'} disabled={!publicStatus} active={!!status.get('reblogged')} - buttonRef={this.setRepostButton} onClick={this.handleRepostClick} /> + @@ -183,6 +193,7 @@ class StatusActionBar extends ImmutablePureComponent { } const messages = defineMessages({ + share: { id: 'status.share', defaultMessage: 'Share' }, comment: { id: 'status.comment', defaultMessage: 'Comment' }, quote: { id: 'status.quote', defaultMessage: 'Quote' }, repost: { id: 'status.repost', defaultMessage: 'Repost' }, @@ -199,6 +210,7 @@ StatusActionBar.propTypes = { onQuote: PropTypes.func.isRequired, onReply: PropTypes.func.isRequired, onRepost: PropTypes.func.isRequired, + onShare: PropTypes.func.isRequired, status: ImmutablePropTypes.map.isRequired, onOpenLikes: PropTypes.func.isRequired, onOpenReposts: PropTypes.func.isRequired,