diff options
Diffstat (limited to 'app/javascript/mastodon/features/compose/components/reply_indicator.js')
-rw-r--r-- | app/javascript/mastodon/features/compose/components/reply_indicator.js | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/app/javascript/mastodon/features/compose/components/reply_indicator.js b/app/javascript/mastodon/features/compose/components/reply_indicator.js index e53831b60..58375976e 100644 --- a/app/javascript/mastodon/features/compose/components/reply_indicator.js +++ b/app/javascript/mastodon/features/compose/components/reply_indicator.js @@ -14,17 +14,21 @@ const messages = defineMessages({ class ReplyIndicator extends ImmutablePureComponent { - constructor (props, context) { - super(props, context); - this.handleClick = this.handleClick.bind(this); - this.handleAccountClick = this.handleAccountClick.bind(this); - } + static contextTypes = { + router: PropTypes.object + }; + + static propTypes = { + status: ImmutablePropTypes.map, + onCancel: PropTypes.func.isRequired, + intl: PropTypes.object.isRequired + }; - handleClick () { + handleClick = () => { this.props.onCancel(); } - handleAccountClick (e) { + handleAccountClick = (e) => { if (e.button === 0) { e.preventDefault(); this.context.router.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`); @@ -58,14 +62,4 @@ class ReplyIndicator extends ImmutablePureComponent { } -ReplyIndicator.contextTypes = { - router: PropTypes.object -}; - -ReplyIndicator.propTypes = { - status: ImmutablePropTypes.map, - onCancel: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired -}; - export default injectIntl(ReplyIndicator); |