{"size": 968, "ext": "js", "max_stars_repo_path": "src/containers/BoardContainer.js", "max_stars_repo_name": "guidiego/webpack-todolist", "max_stars_repo_stars_event_min_datetime": "2016-04-12T15:58:47.000Z", "max_stars_repo_stars_event_max_datetime": "2017-04-03T17:22:25.000Z", "max_issues_repo_path": "src/containers/BoardContainer.js", "max_issues_repo_name": "guidiego/webpack-todolist", "max_issues_repo_issues_event_min_datetime": "2016-11-02T22:28:52.000Z", "max_issues_repo_issues_event_max_datetime": "2016-11-02T22:29:49.000Z", "max_forks_repo_path": "src/containers/BoardContainer.js", "max_forks_repo_name": "guidiego/webpack-todolist", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 26.1621621622, "max_line_length": 66, "alphanum_fraction": 0.6446280992}
import React, {PropTypes} from 'react';

import { List } from 'immutable';
import { connect } from 'react-redux';

import BoardColumn from '../components/Board/BoardColumn';

export const mapStateToProps = (state) => {
  const list = state.getIn(['task', 'list'], List());
  const todo = list.filter(task => task.get('status') === 'todo');
  const wip = list.filter(task => task.get('status') === 'wip');
  const done = list.filter(task => task.get('status') === 'done');

  return { todo, wip, done };
};

export const BoardContainer = ({ todo, wip, done }) => {
  return (
    <div className='row'>
      <BoardColumn title='TODO' items={todo}/>
      <BoardColumn title='WIP' items={wip}/>
      <BoardColumn title='DONE' items={done}/>
    </div>
  );
};

BoardContainer.propTypes = {
  todo: PropTypes.instanceOf(List),
  wip: PropTypes.instanceOf(List),
  done: PropTypes.instanceOf(List)
};

export default connect(
  mapStateToProps,
  null
)(BoardContainer);
