about summary refs log tree commit diff
path: root/app/assets/javascripts/components/features/follow_requests
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/components/features/follow_requests')
-rw-r--r--app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx7
-rw-r--r--app/assets/javascripts/components/features/follow_requests/index.jsx28
2 files changed, 20 insertions, 15 deletions
diff --git a/app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx b/app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx
index 1939eba65..a194d2b27 100644
--- a/app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx
+++ b/app/assets/javascripts/components/features/follow_requests/components/account_authorize.jsx
@@ -1,3 +1,4 @@
+import PropTypes from 'prop-types';
 import ImmutablePropTypes from 'react-immutable-proptypes';
 import Permalink from '../../../components/permalink';
 import Avatar from '../../../components/avatar';
@@ -50,9 +51,9 @@ const AccountAuthorize = ({ intl, account, onAuthorize, onReject }) => {
 
 AccountAuthorize.propTypes = {
   account: ImmutablePropTypes.map.isRequired,
-  onAuthorize: React.PropTypes.func.isRequired,
-  onReject: React.PropTypes.func.isRequired,
-  intl: React.PropTypes.object.isRequired
+  onAuthorize: PropTypes.func.isRequired,
+  onReject: PropTypes.func.isRequired,
+  intl: PropTypes.object.isRequired
 };
 
 export default injectIntl(AccountAuthorize);
diff --git a/app/assets/javascripts/components/features/follow_requests/index.jsx b/app/assets/javascripts/components/features/follow_requests/index.jsx
index 3bee532c5..3dc709654 100644
--- a/app/assets/javascripts/components/features/follow_requests/index.jsx
+++ b/app/assets/javascripts/components/features/follow_requests/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 ImmutablePropTypes from 'react-immutable-proptypes';
 import LoadingIndicator from '../../components/loading_indicator';
 import { ScrollContainer } from 'react-router-scroll';
@@ -17,19 +17,16 @@ const mapStateToProps = state => ({
   accountIds: state.getIn(['user_lists', 'follow_requests', 'items'])
 });
 
-const FollowRequests = React.createClass({
-  propTypes: {
-    params: React.PropTypes.object.isRequired,
-    dispatch: React.PropTypes.func.isRequired,
-    accountIds: ImmutablePropTypes.list,
-    intl: React.PropTypes.object.isRequired
-  },
+class FollowRequests extends React.PureComponent {
 
-  mixins: [PureRenderMixin],
+  constructor (props, context) {
+    super(props, context);
+    this.handleScroll = this.handleScroll.bind(this);
+  }
 
   componentWillMount () {
     this.props.dispatch(fetchFollowRequests());
-  },
+  }
 
   handleScroll (e) {
     const { scrollTop, scrollHeight, clientHeight } = e.target;
@@ -37,7 +34,7 @@ const FollowRequests = React.createClass({
     if (scrollTop === scrollHeight - clientHeight) {
       this.props.dispatch(expandFollowRequests());
     }
-  },
+  }
 
   render () {
     const { intl, accountIds } = this.props;
@@ -63,6 +60,13 @@ const FollowRequests = React.createClass({
       </Column>
     );
   }
-});
+}
+
+FollowRequests.propTypes = {
+  params: PropTypes.object.isRequired,
+  dispatch: PropTypes.func.isRequired,
+  accountIds: ImmutablePropTypes.list,
+  intl: PropTypes.object.isRequired
+};
 
 export default connect(mapStateToProps)(injectIntl(FollowRequests));