{"size": 724, "ext": "js", "max_stars_repo_path": "client/src/components/Landing/Landing.js", "max_stars_repo_name": "JohnIrle/Jive", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/src/components/Landing/Landing.js", "max_issues_repo_name": "JohnIrle/Jive", "max_issues_repo_issues_event_min_datetime": "2018-10-27T17:42:41.000Z", "max_issues_repo_issues_event_max_datetime": "2018-10-27T18:51:52.000Z", "max_forks_repo_path": "client/src/components/Landing/Landing.js", "max_forks_repo_name": "JohnIrle/Jive", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 20.1111111111, "max_line_length": 50, "alphanum_fraction": 0.591160221}
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';

class Landing extends React.Component {
  componentDidMount() {
    if (this.props.auth.isAuthenticated) {
      this.props.history.push('/home');
    }
  }

  render() {
    return (
      <div className="landing">
        <div className="landing-header">
          <img
            className="landing-header-img"
            src={require('../../assets/jive.png')}
            alt="Jive Logo"
          />
        </div>
      </div>
    );
  }
}

Landing.propTypes = {
  auth: PropTypes.object.isRequired
};

const mapStateToProps = state => ({
  auth: state.auth
});

export default connect(mapStateToProps)(Landing);
