فهرست منبع

adjust componentDidMount

itizawa 6 سال پیش
والد
کامیت
1d18afcc69
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      src/client/js/components/LoginForm.jsx

+ 2 - 1
src/client/js/components/LoginForm.jsx

@@ -42,12 +42,13 @@ class LoginForm extends React.Component {
       saml: true,
       basic: true,
     };
+  }
 
+  componentDidMount() {
     const { hash } = window.location;
     if (hash === '#register') {
       this.setState({ isRegistering: true });
     }
-
   }
 
   onClickSwitchFormBtn() {