From f578bb1e48ec4d97bca92c7faf0dd8ed5aeceb39 Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Tue, 1 Sep 2015 17:06:31 -0700
Subject: MM-2065 style refactoring

---
 web/react/components/member_list.jsx | 33 +++++++++++++++++++++++----------
 1 file changed, 23 insertions(+), 10 deletions(-)

(limited to 'web/react/components/member_list.jsx')

diff --git a/web/react/components/member_list.jsx b/web/react/components/member_list.jsx
index 69da5cfc3..f8b07e05b 100644
--- a/web/react/components/member_list.jsx
+++ b/web/react/components/member_list.jsx
@@ -3,32 +3,45 @@
 
 var MemberListItem = require('./member_list_item.jsx');
 
-module.exports = React.createClass({
-    render: function() {
+export default class MemberList extends React.Component {
+    constructor(props) {
+        super(props);
+    }
+
+    render() {
         var members = [];
 
-        if (this.props.memberList != null) {
+        if (this.props.memberList !== null) {
             members = this.props.memberList;
         }
 
-        var message = "";
-        if (members.length === 0)
+        var message = '';
+        if (members.length === 0) {
             message = <span>No users to add.</span>;
+        }
 
         return (
-            <div className="member-list-holder">
-                {members.map(function(member) {
-                    return <MemberListItem 
+            <div className='member-list-holder'>
+                {members.map(function mymembers(member) {
+                    return (<MemberListItem
                                 key={member.id}
                                 member={member}
                                 isAdmin={this.props.isAdmin}
                                 handleInvite={this.props.handleInvite}
                                 handleRemove={this.props.handleRemove}
                                 handleMakeAdmin={this.props.handleMakeAdmin}
-                            />;
+                            />);
                 }, this)}
                 {message}
             </div>
         );
     }
-});
+}
+
+MemberList.propTypes = {
+    memberList: React.PropTypes.array,
+    isAdmin: React.PropTypes.bool,
+    handleInvite: React.PropTypes.func,
+    handleRemove: React.PropTypes.func,
+    handleMakeAdmin: React.PropTypes.func
+};
-- 
cgit v1.2.3-1-g7c22

