From 99b37c0368b18befb499b051fd7284416cbebf66 Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Tue, 1 Sep 2015 11:39:28 -0400
Subject: Reformatted team_settings.jsx to meet style guide requirements.

---
 web/react/components/team_settings.jsx | 117 +++++++++++++++++++--------------
 1 file changed, 67 insertions(+), 50 deletions(-)

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

diff --git a/web/react/components/team_settings.jsx b/web/react/components/team_settings.jsx
index 1a79eef1d..b86520394 100644
--- a/web/react/components/team_settings.jsx
+++ b/web/react/components/team_settings.jsx
@@ -7,64 +7,81 @@ var FeatureTab = require('./team_feature_tab.jsx');
 var GeneralTab = require('./team_general_tab.jsx');
 var utils = require('../utils/utils.jsx');
 
-module.exports = React.createClass({
-    displayName: 'Team Settings',
-    propTypes: {
-        activeTab: React.PropTypes.string.isRequired,
-        activeSection: React.PropTypes.string.isRequired,
-        updateSection: React.PropTypes.func.isRequired,
-        teamDisplayName: React.PropTypes.string.isRequired
-    },
-    componentDidMount: function() {
+export default class TeamSettings extends React.Component {
+    constructor(props) {
+        super(props);
+
+        this.onChange = this.onChange.bind(this);
+
+        this.state = {team: TeamStore.getCurrent()};
+    }
+    componentDidMount() {
         TeamStore.addChangeListener(this.onChange);
-    },
-    componentWillUnmount: function() {
+    }
+    componentWillUnmount() {
         TeamStore.removeChangeListener(this.onChange);
-    },
-    onChange: function() {
+    }
+    onChange() {
         var team = TeamStore.getCurrent();
         if (!utils.areStatesEqual(this.state.team, team)) {
             this.setState({team: team});
         }
-    },
-    getInitialState: function() {
-        return {team: TeamStore.getCurrent()};
-    },
-    render: function() {
+    }
+    render() {
         var result;
         switch (this.props.activeTab) {
-            case 'general':
-                result = (
-                    <div>
-                        <GeneralTab
-                            team={this.state.team}
-                            activeSection={this.props.activeSection}
-                            updateSection={this.props.updateSection}
-                            teamDisplayName={this.props.teamDisplayName}
-                        />
-                    </div>
-                );
-                break;
-            case 'feature':
-                result = (
-                    <div>
-                        <FeatureTab team={this.state.team} activeSection={this.props.activeSection} updateSection={this.props.updateSection} />
-                    </div>
-                );
-                break;
-            case 'import':
-                result = (
-                    <div>
-                        <ImportTab team={this.state.team} activeSection={this.props.activeSection} updateSection={this.props.updateSection} />
-                    </div>
-                );
-                break;
-            default:
-                result = (
-                    <div/>
-                );
-                break;
+        case 'general':
+            result = (
+                <div>
+                    <GeneralTab
+                        team={this.state.team}
+                        activeSection={this.props.activeSection}
+                        updateSection={this.props.updateSection}
+                        teamDisplayName={this.props.teamDisplayName}
+                    />
+                </div>
+            );
+            break;
+        case 'feature':
+            result = (
+                <div>
+                    <FeatureTab
+                        team={this.state.team}
+                        activeSection={this.props.activeSection}
+                        updateSection={this.props.updateSection}
+                    />
+                </div>
+            );
+            break;
+        case 'import':
+            result = (
+                <div>
+                    <ImportTab
+                        team={this.state.team}
+                        activeSection={this.props.activeSection}
+                        updateSection={this.props.updateSection}
+                    />
+                </div>
+            );
+            break;
+        default:
+            result = (
+                <div/>
+            );
+            break;
         }
         return result;
     }
-});
+}
+
+TeamSettings.defaultProps = {
+    activeTab: '',
+    activeSection: '',
+    teamDisplayName: ''
+};
+TeamSettings.propTypes = {
+    activeTab: React.PropTypes.string.isRequired,
+    activeSection: React.PropTypes.string.isRequired,
+    updateSection: React.PropTypes.func.isRequired,
+    teamDisplayName: React.PropTypes.string.isRequired
+};
-- 
cgit v1.2.3-1-g7c22


From 31519f7c88d61bc2828275b1be273cd97c8af4bb Mon Sep 17 00:00:00 2001
From: JoramWilander <jwawilander@gmail.com>
Date: Wed, 2 Sep 2015 08:40:25 -0400
Subject: Changed imports to be upper case for multiple files.

---
 web/react/components/team_settings.jsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

diff --git a/web/react/components/team_settings.jsx b/web/react/components/team_settings.jsx
index b86520394..53855fe1c 100644
--- a/web/react/components/team_settings.jsx
+++ b/web/react/components/team_settings.jsx
@@ -5,7 +5,7 @@ var TeamStore = require('../stores/team_store.jsx');
 var ImportTab = require('./team_import_tab.jsx');
 var FeatureTab = require('./team_feature_tab.jsx');
 var GeneralTab = require('./team_general_tab.jsx');
-var utils = require('../utils/utils.jsx');
+var Utils = require('../utils/utils.jsx');
 
 export default class TeamSettings extends React.Component {
     constructor(props) {
@@ -23,7 +23,7 @@ export default class TeamSettings extends React.Component {
     }
     onChange() {
         var team = TeamStore.getCurrent();
-        if (!utils.areStatesEqual(this.state.team, team)) {
+        if (!Utils.areStatesEqual(this.state.team, team)) {
             this.setState({team: team});
         }
     }
-- 
cgit v1.2.3-1-g7c22

