content: import React from 'react'
  
  export default class ProjectsShowView extends React.Component {
    componentDidMount () {
      this.props.onMount(this.props.params.projectId)
    }
  
    _handleSubmit (e) {
      const { name } = this.refs
      const data = {
        name: name.value
      }
  
      this.props.addCandidate(data)
    }
  
    _renderAddCandidateForm () {
      return (
        <div className="projects-show-add-candidate-form-container">
          <form onSubmit={::this._handleSubmit}>
            <input
              ref='name'
              id='board-name'
              placeholder='Candidate Name' />
            <button type="submit">Add candidate</button>
          </form>
        </div>
      )
    }
  
    _renderProject () {
      let { fetching , id} = this.props
      console.log(this.props)
  
      let content = false
  
      if (!fetching) {
        let candidates_rows = this.props.candidates.map(c => {
          console.log(c)
          return (
            <tr
              key={c.id}
              onClick={() => this.props.onCandidateClick(id, c.id)}>
              <td>
                {c.name}
              </td>
              <td>
                {c.email}
              </td>
            </tr>
          )
        })
        content = (
          <div className='projects-show-container'>
            <h1>{this.props.name}</h1>
            <h5>ID: {this.props.id}</h5>
            <h2>Candidates</h2>
            <div>
              <table>
                <thead>
                  <td>Name</td>
                  <td>Email</td>
                </thead>
                <tbody>
                  {candidates_rows}
                </tbody>
              </table>
            </div>
            {/* Placing this.props.children here ensures that the currentProject is done fetching between the children render. */}
            {this.props.children}
          </div>
        )
      }
  
      return content
    }
  
    render () {
      return (
        <div>
          {::this._renderProject()}
        </div>
      )
    }
  }
  
  