<commit_before>// @flow
import React, { Component } from 'react';
import Login from '../components/Login/Login';
import { connect } from 'react-redux';
import { bindActionCreators } from 'Redux';
import { loginUser } from '../actions/index';
import PropTypes from 'prop-types';
import { TextField, FlatButton, Card } from 'material-ui';
import styles from '../components/Login/Login.css';
import { Link } from 'react-router';


class SignUpPage extends Component {
  constructor(props) {
    super(props);
    this.state = {email: '', password: '',firstName: '', lastName:''};

    this.handleChange = this.handleChange.bind(this);
    this.handleSubmit = this.handleSubmit.bind(this);
  }

  componentWillUpdate(nextProps) {
    if (nextProps.authenticated) {
      this.props.router.replace('/dashboard/home');
    }
  }

  handleChange(event) {
    const target = event.target;
    const name = target.name;
    this.setState({
      [name]: target.value
    });
  }

  handleSubmit(event) {
    event.preventDefault();

    const url = 'https://serene-island-28717.herokuapp.com/signup';

    let data = {
      email: this.state.email,
      password: <PASSWORD>,
      firstName: this.state.firstName,
      lastName: this.state.lastName
    }

    let myHeaders = new Headers({
      "Content-Type" : "application/json"
    })

    let fetchData = {
      method: 'POST',<commit_msg>Fixed various linter issues<commit_after>// @flow
import React, { Component } from 'react';
import { TextField, FlatButton } from 'material-ui';
import { connect } from 'react-redux';
import { bindActionCreators } from 'Redux';
import PropTypes from 'prop-types';
import { loginUser } from '../actions/index';
import styles from '../components/Login/Login.css';
import Login from '../components/Login/Login';


class SignUpPage extends Component {

  static propTypes = {
    loginUser: PropTypes.func,
  }

  constructor(props) {
    super(props);
    this.state = { email: '', password: '', firstName: '', lastName: '' };

    this.handleChange = this.handleChange.bind(this);
    this.handleSubmit = this.handleSubmit.bind(this);
  }

  componentWillUpdate(nextProps) {
    if (nextProps.authenticated) {
      this.props.router.replace('/dashboard/home');
    }
  }

  handleChange(event) {
    const target = event.target;
    const name = target.name;
    this.setState({
      [name]: target.value
    });
  }

  handleSubmit(event) {
    event.preventDefault();

    const url = 'https://serene-island-28717.herokuapp.com/signup';

    const data = {
      email: this.state.email,
      password: <PASSWORD>,
      firstName: this.state.firstName,
      lastName: this.state.lastName
    }

    const myHeaders = new Headers({
      'Content-Type': 'application/json'
    });

    const fetchData = {
      method: 'POST',
{'fraction_non_alphanumeric': 0.14392059553349876, 'fraction_numerical': 0.003544842254519674, 'mean_word_length': 3.2056631892697465, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '897117', 'n_tokens_mistral': 872, 'n_tokens_neox': 850, 'n_words': 191}