<commit_before>import React from 'react'
import {appState} from '../store/lukkariStore'

const sendButton = (waitingAjax) => waitingAjax ?
  <img className='modal-ajax-spinner' src='/spinner.gif'/> :
  <button type='button' id='saveId' className='modal-button' data-dismiss='modal'
          onClick={(e) => {
            appState.dispatch({
              type: 'SEND_EMAIL',
              waitingAjax: true,
              email: e.target.previousElementSibling.value
            })
          }}>
    Send
  </button>

class Modal extends React.Component {
  render() {
    const {isModalOpen, waitingAjax} = this.props.state

    return isModalOpen ? <div className='modal-dialog'>
        <div>
          <div id='saveClose' onClick={() => {appState.dispatch({type: 'SAVE_MODAL', isModalOpen: false})}}
               className='close'>X
          </div>
          <div>Send course selection URL to your email.</div>
          <form className='modal-input-container'>
            <input type='email' className='modal-input' id='saveEmail' placeholder='Email' autoFocus="true"/>
            {sendButton(waitingAjax)}
          </form>
        </div>
      </div> : null
  }
}

export default Modal<commit_msg>Fix linter issues<commit_after>import React from 'react'
import {appState} from '../store/lukkariStore'

const sendButton = (waitingAjax) => waitingAjax ?
  <img className='modal-ajax-spinner' src='/spinner.gif'/> :
  <button type='button' id='saveId' className='modal-button' data-dismiss='modal'
          onClick={(e) => {
            appState.dispatch({
              type: 'SEND_EMAIL',
              waitingAjax: true,
              email: e.target.previousElementSibling.value
            })
          }}>
    Send
  </button>

class Modal extends React.Component {
  render() {
    const {isModalOpen, waitingAjax} = this.props.state

    return isModalOpen ? <div className='modal-dialog'>
        <div>
          <div id='saveClose'
               onClick={() => {
                 appState.dispatch({type: 'SAVE_MODAL', isModalOpen: false})
               }}
               className='close'>X
          </div>
          <div>Send course selection URL to your email.</div>
          <form className='modal-input-container'>
            <input type='email' className='modal-input' id='saveEmail' placeholder='Email' autoFocus="true"/>
            {sendButton(waitingAjax)}
          </form>
        </div>
      </div> : null
  }
}

export default Modal
{'fraction_non_alphanumeric': 0.1407197735543874, 'fraction_numerical': 0.0, 'mean_word_length': 2.334231805929919, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 37, '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': '4187267', 'n_tokens_mistral': 718, 'n_tokens_neox': 722, 'n_words': 153}