diff options
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/boost_modal.js')
-rw-r--r-- | app/javascript/mastodon/features/ui/components/boost_modal.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/app/javascript/mastodon/features/ui/components/boost_modal.js b/app/javascript/mastodon/features/ui/components/boost_modal.js index d6000fe4e..0bd19b18d 100644 --- a/app/javascript/mastodon/features/ui/components/boost_modal.js +++ b/app/javascript/mastodon/features/ui/components/boost_modal.js @@ -16,18 +16,29 @@ const messages = defineMessages({ class BoostModal extends ImmutablePureComponent { + static contextTypes = { + router: PropTypes.object + }; + + static propTypes = { + status: ImmutablePropTypes.map.isRequired, + onReblog: PropTypes.func.isRequired, + onClose: PropTypes.func.isRequired, + intl: PropTypes.object.isRequired + }; + constructor (props, context) { super(props, context); this.handleReblog = this.handleReblog.bind(this); this.handleAccountClick = this.handleAccountClick.bind(this); } - handleReblog() { + handleReblog = () => { this.props.onReblog(this.props.status); this.props.onClose(); } - handleAccountClick (e) { + handleAccountClick = (e) => { if (e.button === 0) { e.preventDefault(); this.props.onClose(); @@ -70,15 +81,4 @@ class BoostModal extends ImmutablePureComponent { } -BoostModal.contextTypes = { - router: PropTypes.object -}; - -BoostModal.propTypes = { - status: ImmutablePropTypes.map.isRequired, - onReblog: PropTypes.func.isRequired, - onClose: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired -}; - export default injectIntl(BoostModal); |