From 7b70892c75aec62a7b4fa326b08fbda26d4e3262 Mon Sep 17 00:00:00 2001
From: Reed Garmsen <rgarmsen2295@gmail.com>
Date: Wed, 2 Sep 2015 16:42:20 -0700
Subject: Moved componentWillMount logic into the constructor of the react
 components it was used in

---
 web/react/components/team_signup_send_invites_page.jsx | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

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

diff --git a/web/react/components/team_signup_send_invites_page.jsx b/web/react/components/team_signup_send_invites_page.jsx
index 35d2441c5..11a9980d7 100644
--- a/web/react/components/team_signup_send_invites_page.jsx
+++ b/web/react/components/team_signup_send_invites_page.jsx
@@ -18,6 +18,11 @@ export default class TeamSignupSendInvitesPage extends React.Component {
         this.state = {
             emailEnabled: !ConfigStore.getSettingAsBoolean('ByPassEmail', false)
         };
+
+        if (!this.state.emailEnabled) {
+            this.props.state.wizard = 'username';
+            this.props.updateParent(this.props.state);
+        }
     }
     submitBack(e) {
         e.preventDefault();
@@ -75,12 +80,6 @@ export default class TeamSignupSendInvitesPage extends React.Component {
             this.submitNext(e);
         }
     }
-    componentWillMount() {
-        if (!this.state.emailEnabled) {
-            this.props.state.wizard = 'username';
-            this.props.updateParent(this.props.state);
-        }
-    }
     componentDidMount() {
         if (!this.state.emailEnabled) {
             // Must use keypress not keyup due to event chain of pressing enter
-- 
cgit v1.2.3-1-g7c22

