Преглед на файлове

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() {