about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features/home_timeline/index.jsx
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-04-22 03:05:35 +0900
committerEugen <eugen@zeonfederated.com>2017-04-21 20:05:35 +0200
commit1948f9e767c5c8f7cb52337ce777a61b5ad1a599 (patch)
tree4d5f3549f6e5fd88340bb3543e1eb2eafc47952c /app/assets/javascripts/components/features/home_timeline/index.jsx
parent27ea2a88c12835b491ea5537f934983470faf781 (diff)
Remove deprecated features at React v15.5 (#1905)
* Remove deprecated features at React v15.5

- [x] React.PropTypes
- [x] react-addons-pure-render-mixin
- [x] react-addons-test-utils

* Uncommented out & Add browserify_rails options

* re-add react-addons-shallow

* Fix syntax error from resolve conflicts

* follow up 59a77923b368d48c590cd9f4a0c6b73ce972d33f
Diffstat (limited to 'app/assets/javascripts/components/features/home_timeline/index.jsx')
-rw-r--r--app/assets/javascripts/components/features/home_timeline/index.jsx20
1 files changed, 9 insertions, 11 deletions
diff --git a/app/assets/javascripts/components/features/home_timeline/index.jsx b/app/assets/javascripts/components/features/home_timeline/index.jsx
index a2b775764..6b986171e 100644
--- a/app/assets/javascripts/components/features/home_timeline/index.jsx
+++ b/app/assets/javascripts/components/features/home_timeline/index.jsx
@@ -1,5 +1,5 @@
 import { connect } from 'react-redux';
-import PureRenderMixin from 'react-addons-pure-render-mixin';
+import PropTypes from 'prop-types';
 import StatusListContainer from '../ui/containers/status_list_container';
 import Column from '../ui/components/column';
 import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
@@ -14,14 +14,7 @@ const mapStateToProps = state => ({
   hasUnread: state.getIn(['timelines', 'home', 'unread']) > 0
 });
 
-const HomeTimeline = React.createClass({
-
-  propTypes: {
-    intl: React.PropTypes.object.isRequired,
-    hasUnread: React.PropTypes.bool
-  },
-
-  mixins: [PureRenderMixin],
+class HomeTimeline extends React.PureComponent {
 
   render () {
     const { intl, hasUnread } = this.props;
@@ -32,8 +25,13 @@ const HomeTimeline = React.createClass({
         <StatusListContainer {...this.props} type='home' emptyMessage={<FormattedMessage id='empty_column.home' defaultMessage="You aren't following anyone yet. Visit {public} or use search to get started and meet other users." values={{ public: <Link to='/timelines/public'><FormattedMessage id='empty_column.home.public_timeline' defaultMessage='the public timeline' /></Link> }} />} />
       </Column>
     );
-  },
+  }
 
-});
+}
+
+HomeTimeline.propTypes = {
+  intl: PropTypes.object.isRequired,
+  hasUnread: PropTypes.bool
+};
 
 export default connect(mapStateToProps)(injectIntl(HomeTimeline));