diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-05-12 21:44:10 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-05-12 14:44:10 +0200 |
commit | 2991a7cfe685ca9b42230b7030b9e7d0ece94c88 (patch) | |
tree | 72da0f02bc6279aeab1e641fb7d51527efcb9066 /app/javascript/mastodon/features/hashtag_timeline/index.js | |
parent | 44a3584e2d54488393e6f50e482ed61d2765e312 (diff) |
Use ES Class Fields & Static Properties (#3008)
Use ES Class Fields & Static Properties (currently stage 2) for improve class outlook. Added babel-plugin-transform-class-properties as a Babel plugin.
Diffstat (limited to 'app/javascript/mastodon/features/hashtag_timeline/index.js')
-rw-r--r-- | app/javascript/mastodon/features/hashtag_timeline/index.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/javascript/mastodon/features/hashtag_timeline/index.js b/app/javascript/mastodon/features/hashtag_timeline/index.js index f5134decf..91b62a6f9 100644 --- a/app/javascript/mastodon/features/hashtag_timeline/index.js +++ b/app/javascript/mastodon/features/hashtag_timeline/index.js @@ -20,6 +20,14 @@ const mapStateToProps = state => ({ class HashtagTimeline extends React.PureComponent { + static propTypes = { + params: PropTypes.object.isRequired, + dispatch: PropTypes.func.isRequired, + streamingAPIBaseURL: PropTypes.string.isRequired, + accessToken: PropTypes.string.isRequired, + hasUnread: PropTypes.bool + }; + _subscribe (dispatch, id) { const { streamingAPIBaseURL, accessToken } = this.props; @@ -79,12 +87,4 @@ class HashtagTimeline extends React.PureComponent { } -HashtagTimeline.propTypes = { - params: PropTypes.object.isRequired, - dispatch: PropTypes.func.isRequired, - streamingAPIBaseURL: PropTypes.string.isRequired, - accessToken: PropTypes.string.isRequired, - hasUnread: PropTypes.bool -}; - export default connect(mapStateToProps)(HashtagTimeline); |