<commit_before>import React, { PropTypes } from 'react';
import DatePickerWrapper from './DatePickerWrapper';
import Spinner from './Spinner';

export const EmailForm = ({ handleSendEmail, handleDatepickerVisiblity, datePickerVisibility, emailSent, sendingEmail }) => {
  console.log(sendingEmail);
  if(emailSent) {
    return (
      <div>
        {'Email has been sent.'}
      </div>
    );
  }

  return (
    <div className='email-form'>
      <form onSubmit={handleSendEmail}>
        <div>
          {'Please fill e-mail form if you wish results to be e-mailed to you.'}
        </div>
        <div>
          <input placeholder='Email' type='text' name='email' className='email-form-input' />
        </div>
        <div>
          <input
            onClick={handleDatepickerVisiblity} className='importdate-input email-form-input'
            placeholder='Select import date' id='importdate' autoComplete='off'
          />
        {datePickerVisibility && <DatePickerWrapper resultLocationId='importdate' />}
        </div>
        <button className='email-form-button' type='submit'>{'Send results to email'}</button>
        <div>{sendingEmail && <Spinner />}</div>
      </form>
    </div>
  );
};

EmailForm.propTypes = {
  handleSendEmail: PropTypes.func.isRequired,
  handleDatepickerVisiblity: PropTypes.func.isRequired,
  datePickerVisibility: PropTypes.bool.isRequired,
  emailSent: PropTypes.bool,
  sendingEmail: PropTypes.bool
};

export default EmailForm;<commit_msg>minor fixes<commit_after>import React, { PropTypes } from 'react';
import DatePickerWrapper from './DatePickerWrapper';
import Spinner from './Spinner';

export const EmailForm = ({ handleSendEmail, handleDatepickerVisiblity, datePickerVisibility, emailSent, sendingEmail }) => {
  if(emailSent) {
    return (
      <div className='note'>
        {'E-mail has been sent.'}
      </div>
    );
  }

  return (
    <div className='email-form'>
      <form onSubmit={handleSendEmail}>
        <div>
          {'Please fill e-mail form if you wish results to be e-mailed to you.'}
        </div>
        <div>
          <input placeholder='Email' type='text' name='email' className='email-form-input' />
        </div>
        <div>
          <input
            onClick={handleDatepickerVisiblity} className='importdate-input email-form-input'
            placeholder='Select import date' id='importdate' autoComplete='off'
          />
        {datePickerVisibility && <DatePickerWrapper resultLocationId='importdate' />}
        </div>
        <button className='email-form-button' type='submit'>{'Send results to email'}</button>
        <div className='note'>{sendingEmail && <Spinner />}</div>
      </form>
    </div>
  );
};

EmailForm.propTypes = {
  handleSendEmail: PropTypes.func.isRequired,
  handleDatepickerVisiblity: PropTypes.func.isRequired,
  datePickerVisibility: PropTypes.bool.isRequired,
  emailSent: PropTypes.bool,
  sendingEmail: PropTypes.bool
};

export default EmailForm;
{'fraction_non_alphanumeric': 0.1321954484605087, 'fraction_numerical': 0.0, 'mean_word_length': 3.1114167812929847, 'pattern_counts': {'":': 0, '<': 43, '<?xml version=': 0, '>': 45, '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': '2121893', 'n_tokens_mistral': 853, 'n_tokens_neox': 861, 'n_words': 193}