yusuketk 6 лет назад
Родитель
Сommit
5bbcd88b4b
1 измененных файлов с 6 добавлено и 29 удалено
  1. 6 29
      src/client/js/components/LoginForm.jsx

+ 6 - 29
src/client/js/components/LoginForm.jsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import React from 'react';
 import PropTypes from 'prop-types';
 import PropTypes from 'prop-types';
-import { createSubscribedElement } from './UnstatedUtils';
-import AppContainer from '../services/AppContainer';
+
+import { withTranslation } from 'react-i18next';
 
 
 class LoginForm extends React.Component {
 class LoginForm extends React.Component {
 
 
@@ -10,43 +10,20 @@ class LoginForm extends React.Component {
 
 
     this.state = {
     this.state = {
     };
     };
-
-  }
-
-  componentDidMount() {
-  }
-
-  componentWillUnmount() {
   }
   }
 
 
   render() {
   render() {
 
 
     return (
     return (
-      <div className="main container-fluid">
-      </div>
+      <div className="aaaaa"></div>
     );
     );
   }
   }
 
 
 }
 }
 
 
-/**
- * Wrapper component for using unstated
- */
-const LoginFormWrapper = (props) => {
-  return createSubscribedElement(LoginForm, props, [AppContainer]);
-};
-
 LoginForm.propTypes = {
 LoginForm.propTypes = {
-  t: PropTypes.func.isRequired, // i18next
-  appContainer: PropTypes.instanceOf(AppContainer).isRequired,
-
-  keyword: PropTypes.string,
-  onSubmit: PropTypes.func.isRequired,
-  onInputChange: PropTypes.func,
-};
-
-LoginForm.defaultProps = {
-  onInputChange: () => { },
+  // i18next
+  t: PropTypes.func.isRequired,
 };
 };
 
 
-export default LoginFormWrapper;
+export default withTranslation()(LoginForm);