content: import React from 'react'
  import UserActions from 'actions/user-actions'
  
  export default class NewUser extends React.Component {
  
    static defaultPropTypes = {
    }
  
    constructor(props) {
      super(props)
      this.state = {
      }
      this.handleFirstNameChange = this.handleFirstNameChange.bind(this)
      this.handleLastNameChange = this.handleLastNameChange.bind(this)
      this.handleEmailChange = this.handleEmailChange.bind(this)
      this.handleSubmitNewUser = this.handleSubmitNewUser.bind(this)
    }
  
    handleFirstNameChange(evt) {
      this.setState({
        firstName: evt.target.value,
      })
    }
  
    handleLastNameChange(evt) {
      this.setState({
        lastName: evt.target.value,
      })
    }
  
    handleEmailChange(evt) {
      this.setState({
        email: evt.target.value,
      })
    }
    handleSubmitNewUser(evt) {
      evt.preventDefault()
      UserActions.createUser({
        firstName: this.state.firstName,
        lastName: this.state.lastName,
        email: this.state.email,
      })
    }
  
    render() {
      return (
        <div>
          <h4>New User</h4>
          <div>
            <label>First Name</label>
          </div>
          <div>
            <input
              onChange={this.handleFirstNameChange}
              name="firstName"
              type="text"
             />
           </div>
          <div>
            <label>Last Name</label>
          </div>
          <div>
            <input
              onChange={this.handleLastNameChange}
              name="lastName"
              type="text"
             />
           </div>
          <div>
            <label>Email</label>
          </div>
          <div>
            <input
              onChange={this.handleEmailChange}
              name="lastName"
              type="text"
             />
           </div>
           <div>
            <input
              onClick={this.handleSubmitNewUser}
              type="submit"
              value="Submit"
            />
            <br />
          </div>
        </div>
      )
    }
  
  }
  