{"size": 1707, "ext": "js", "max_stars_repo_path": "BBCG-UI/src/Pages/Login/index.js", "max_stars_repo_name": "Deepankar01/university-management-system", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "BBCG-UI/src/Pages/Login/index.js", "max_issues_repo_name": "Deepankar01/university-management-system", "max_issues_repo_issues_event_min_datetime": "2019-04-01T13:19:07.000Z", "max_issues_repo_issues_event_max_datetime": "2019-04-01T13:24:02.000Z", "max_forks_repo_path": "BBCG-UI/src/Pages/Login/index.js", "max_forks_repo_name": "Deepankar01/university-management-system", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 11, "max_forks_count": null, "avg_line_length": 25.4776119403, "max_line_length": 68, "alphanum_fraction": 0.5336848272}
import React, { PureComponent } from 'react';
import { Fabric } from 'office-ui-fabric-react/lib/Fabric';
import { TextField } from 'office-ui-fabric-react/lib/TextField';
import { DefaultButton } from 'office-ui-fabric-react/lib/Button';
import PropTypes from 'prop-types';
import { getMessage } from '../../utils';
import './style.css';

class Login extends PureComponent {
  constructor(props) {
    super(props);
    this.props = props;
    this.state = {};
  }

  render() {
    const { staticContent } = this.props;
    const { appName, loginScreenLabels } = staticContent;
    return (
      <Fabric>
        <div className="login">
          <div className="form">
            <form onSubmit={this.authenticate}>
              <div>
                <TextField
                  label={loginScreenLabels.username}
                  type="text"
                  required
                />
              </div>
              <div>
                <TextField
                  label={loginScreenLabels.password}
                  type="text"
                  required
                />
              </div>
              <div>
                <DefaultButton text={loginScreenLabels.loginText} />
              </div>
            </form>
          </div>
          <div className="pane">
            <h1>{appName}</h1>
          </div>
        </div>
      </Fabric>
    );
  }
}

Login.propTypes = {
  staticContent: PropTypes.shape({
    appName: PropTypes.string,
    loginScreenLabels: PropTypes.instanceOf(Object),
  }),
};

Login.defaultProps = {
  staticContent: {
    appName: getMessage('layout', 'universityName'),
    loginScreenLabels: getMessage('login'),
  },
};

export default Login;
