{"size": 688, "ext": "js", "max_stars_repo_path": "src/containers/Boards.js", "max_stars_repo_name": "echonox/echo-react-trello", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/containers/Boards.js", "max_issues_repo_name": "echonox/echo-react-trello", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/containers/Boards.js", "max_forks_repo_name": "echonox/echo-react-trello", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.5714285714, "max_line_length": 56, "alphanum_fraction": 0.5755813953}
import { connect } from 'react-redux';
import Boards from '../components/Boards';
import { withRouter } from 'react-router-dom';
import { BOARD_TITLE, DELETE_BOARD } from '../actions';

const mapStateToProps = (state, ownProps) => {
    return {
        boards: state.boards
    }
}

const mapDispatchToProps = (dispatch, ownProps) => {
    return {
        clearAppBarTitle: () => {
            dispatch({type: BOARD_TITLE, title: ''})
        },
        deleteBoard: boardId => {
            dispatch({type: DELETE_BOARD, boardId})
        }
    }
}

export default withRouter(
    connect(
        mapStateToProps,
        mapDispatchToProps
    )(Boards)
);