<commit_before>import React, { Component, PropTypes } from 'react';
import { reduxForm } from 'redux-form';
import './style.scss';
import { loginUser, signupUser } from '../../actions/login.js';

class Login extends Component {
  constructor(props) {
    super(props);
    this.onSignup = this.onSignup.bind(this);
    this.onSubmit = this.onSubmit.bind(this);
  }

  onSubmit(e) {
    e.preventDefault();
    const creds = {
      email: this.props.data.email.value,
      pass: this.props.data.pass.value

    };

    this.props.loginUser(creds, this.props.dispatch).then((res) => {
      if (res.isAuthenticated) {
        this.context.router.push('/');
      }
    });
    this.props.resetForm();
  }

  onSignup(e) {
    e.preventDefault();
    const creds = {
      email: this.props.data.email.value,
      pass: this.props.data.pass.value

    };

    this.props.signupUser(creds, this.props.dispatch).then((res) => {
      if (res.isAuthenticated) {
        this.context.router.push('/');
      }
    });
    this.props.resetForm();
  }

  render() {
    const { fields: { email, pass }, user } = this.props;
    console.log(this);
    return (
        <div className="middle valign-wrapper">
          <form className="login-form" onSubmit={this.onSubmit}>
            <div className="error-message center">{user.message}</div>
            <div className="input-field">
              <input type="text" className="validate form-control" {...email} />
              <label htmlFor="icon_prefix">Email</label>
            </div>
            <div className="input-field">
              <input type="password" className="validate form-control" {...pass} />
              <label htmlFor="icon_telephone">Password</label>
            </div>
            <div className="center-align login-buttons">
            <button onClick={this.onSignup} className="btn waves-effect waves-light">
              SignUP
              <i className="fa fa-info fa-2x fa-spin right"></i>
            </button>
            <button onClcik={this.onLogin} className="btn waves-effect waves-light">
              Login
              <i className="fa fa-info fa-2x fa-spin right"></i>
            </button>
            </div>
          </form>
        </div><commit_msg>fix typos, close #32<commit_after>import React, { Component, PropTypes } from 'react';
import { reduxForm } from 'redux-form';
import './style.scss';
import { loginUser, signupUser } from '../../actions/login.js';

class Login extends Component {
  constructor(props) {
    super(props);
    this.onSignup = this.onSignup.bind(this);
    this.onSubmit = this.onSubmit.bind(this);
  }

  onSubmit(e) {
    e.preventDefault();
    const creds = {
      email: this.props.data.email.value,
      pass: <PASSWORD>

    };

    this.props.loginUser(creds, this.props.dispatch).then((res) => {
      if (res.isAuthenticated) {
        this.context.router.push('/');
      }
    });
    this.props.resetForm();
  }

  onSignup(e) {
    e.preventDefault();
    const creds = {
      email: this.props.data.email.value,
      pass: this.<PASSWORD>.value

    };

    this.props.signupUser(creds, this.props.dispatch).then((res) => {
      if (res.isAuthenticated) {
        this.context.router.push('/');
      }
    });
    this.props.resetForm();
  }

  render() {
    const { fields: { email, pass }, user } = this.props;
    return (
        <div className="middle valign-wrapper">
          <form className="login-form" onSubmit={this.onSubmit}>
            <div className="error-message center">{user.message}</div>
            <div className="input-field">
              <input type="text" className="validate form-control" {...email} />
              <label htmlFor="icon_prefix">Email</label>
            </div>
            <div className="input-field">
              <input type="password" className="validate form-control" {...pass} />
              <label htmlFor="icon_telephone">Password</label>
            </div>
            <div className="center-align login-buttons">
            <button onClick={this.onSignup} className="btn waves-effect waves-light">
              SignUP
              <i className="fa fa-info fa-2x fa-spin right"></i>
            </button>
            <button onClcik={this.onLogin} className="btn waves-effect waves-light">
              Login
              <i className="fa fa-info fa-2x fa-spin right"></i>
            </button>
            </div>
          </form>
        </div>
{'fraction_non_alphanumeric': 0.15677491601343785, 'fraction_numerical': 0.0013437849944008958, 'mean_word_length': 2.1763869132290186, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4528081', 'n_tokens_mistral': 1341, 'n_tokens_neox': 1331, 'n_words': 251}