{"size": 1126, "ext": "js", "max_stars_repo_path": "lib/components/Application.js", "max_stars_repo_name": "blckt/clientproject", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/components/Application.js", "max_issues_repo_name": "blckt/clientproject", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/components/Application.js", "max_forks_repo_name": "blckt/clientproject", "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": 23.4583333333, "max_line_length": 62, "alphanum_fraction": 0.6003552398}
import React, { PropTypes } from 'react';
import DisplayError from './DisplayError';
import { connect } from 'react-redux';
import Header from './Header';
class Application extends React.Component {

  static propTypes = {
    children: PropTypes.any,
    application: PropTypes.object
  };

  constructor(props, context) {
    super(props, context);
    this.handleMenuClick = this.handleMenuClick.bind(this);
    this.state = {
      isMenuActive: false
    };
  }

  componentDidUpdate() {

  }

  handleMenuClick(evt) {
    evt.preventDefault();
    this.setState({ isMenuActive: !this.state.isMenuActive });
  }

  render() {
    const { isMenuActive } = this.state;
    const activeClass = isMenuActive ? 'active' : '';
    return (
      <div id="layout" className={activeClass}>
        <div id="main">
          <DisplayError />
          <Header />
          {/* this will render the child routes */}
          <div style={{ margin: '10px 0' }}>
          {this.props.children}
          </div>
        </div>
      </div>
    );
  }
}
export default connect(
  ({ application }) => ({ application }))(Application);
