{"size": 933, "ext": "js", "max_stars_repo_path": "client/analytics/components/partials/tables/TableWithTitleContainer.js", "max_stars_repo_name": "Haaarp/geo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/analytics/components/partials/tables/TableWithTitleContainer.js", "max_issues_repo_name": "Haaarp/geo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/analytics/components/partials/tables/TableWithTitleContainer.js", "max_forks_repo_name": "Haaarp/geo", "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": 31.1, "max_line_length": 78, "alphanum_fraction": 0.6109324759}
import React from 'react';
import {connect} from 'react-redux';

import TableWithTitle from './TableWithTitle';

class TableWithTitleContainer extends React.Component {
    render() {
        return (
            <TableWithTitle
                title={this.props.title}
                headers={this.props.headers}
                rows={this.props.rows}
                rowTransform={this.props.rowTransform}
                headerTransform={this.props.headerTransform}
            />
        );
    }
}

const stateMap = (state, props, ownProps) => {
    return {
        title: props.title? props.title: '',
        headers: props.headers ? props.headers : [],
        rows: props.rows ? props.rows : [[]],
        rowTransform: props.rowTransform ? props.rowTransform : null,
        headerTransform: props.headerTransform ? props.headerTransform : null,
    };
};

export default connect(stateMap, null)(TableWithTitleContainer);