<commit_before>import React, { Component } from 'react';
import { connect } from 'react-redux';
import LoginForm from './loginFormContainer';
import { login } from '../../../modules/user/actions/index';

class Login extends Component {

  handleLoginSubmit = (data, dispatch) => {
    dispatch(login(data.email, data.password));
  };

  render() {
    return (
        <LoginForm
          onSubmit={this.handleLoginSubmit}
          header={"Login"}
        />
    );
  }
}

export default connect((state) => ({
}))(Login);<commit_msg>Setup login component to utilize redirect query param if present<commit_after>import React, { Component } from 'react';
import { connect } from 'react-redux';
import LoginForm from './loginFormContainer';
import { login } from '../../../modules/user/actions/index';

class Login extends Component {
  static propTypes = {
    redirect: React.PropTypes.object,
  };

  handleLoginSubmit = (data, dispatch) => {
    const { redirect } = this.props;
    dispatch(login(data.email, data.password, redirect));
  };

  render() {
    return (
        <LoginForm
          onSubmit={this.handleLoginSubmit}
          header={"Login"}
        />
    );
  }
}

export default connect((state) => ({
  redirect: state.routing.location.query.redirect,
}))(Login);
{'fraction_non_alphanumeric': 0.1522921522921523, 'fraction_numerical': 0.0, 'mean_word_length': 3.1414790996784565, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '4135976', 'n_tokens_mistral': 364, 'n_tokens_neox': 362, 'n_words': 88}