import React, { cloneElement, PropTypes } from 'react'; import { contain } from 'thundercats-react'; import { Button, Panel, Row, Col } from 'react-bootstrap'; import ListJobs from './List.jsx'; export default contain( { store: 'jobsStore', fetchAction: 'jobActions.getJobs', actions: [ 'appActions', 'jobActions' ] }, React.createClass({ displayName: 'Jobs', propTypes: { children: PropTypes.element, numOfFollowers: PropTypes.number, appActions: PropTypes.object, jobActions: PropTypes.object, jobs: PropTypes.array, showModal: PropTypes.bool }, componentDidMount() { const { jobActions } = this.props; jobActions.getFollowers(); }, handleJobClick(id) { const { appActions, jobActions } = this.props; if (!id) { return null; } jobActions.findJob(id); appActions.updateRoute(`/jobs/${id}`); }, renderList(handleJobClick, jobs) { return ( ); }, renderChild(child, jobs) { if (!child) { return null; } return cloneElement( child, { jobs } ); }, render() { const { children, jobs, appActions } = this.props; return (

Hire a JavaScript engineer who's experienced in HTML5, Node.js, MongoDB, and Agile Development.

{`

We hired our last developer out of Free Code Camp and couldn't be happier. Free Code Camp is now our go-to way to bring on pre-screened candidates who are enthusiastic about learning quickly and becoming immediately productive in their new career.

Michael Gai, CEO at CoNarrative
{ this.renderChild(children, jobs) || this.renderList(this.handleJobClick, jobs) } ); } }) );