{"size": 622, "ext": "js", "max_stars_repo_path": "client/src/pages/Dashboard.js", "max_stars_repo_name": "rooneyrulz/react_blog_app", "max_stars_repo_stars_event_min_datetime": "2020-03-29T10:13:02.000Z", "max_stars_repo_stars_event_max_datetime": "2020-03-29T10:13:02.000Z", "max_issues_repo_path": "client/src/pages/Dashboard.js", "max_issues_repo_name": "rooneyrulz/react_blog_app", "max_issues_repo_issues_event_min_datetime": "2021-03-10T02:39:21.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-25T23:11:54.000Z", "max_forks_repo_path": "client/src/pages/Dashboard.js", "max_forks_repo_name": "rooneyrulz/react_blog_app", "max_forks_repo_forks_event_min_datetime": "2020-08-06T08:36:28.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-13T17:05:42.000Z"}
{"max_stars_count": 1, "max_issues_count": 5, "max_forks_count": 2, "avg_line_length": 20.7333333333, "max_line_length": 64, "alphanum_fraction": 0.6672025723}
import React from 'react';
import PropTypes from 'prop-types';

// REDUX
import { connect } from 'react-redux';

// COMPONENTS

const Dashboard = ({ isAuthenticated, history }) => {
  if (!isAuthenticated) history.push('/login');

  return (
    <div className='Dashboard'>
      <div className='jumbotron' style={{ background: '#fff' }}>
        <h1 className='display-4'>Dashboard</h1>
      </div>
    </div>
  );
};

Dashboard.propTypes = {
  isAuthenticated: PropTypes.bool
};

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

export default connect(mapStateToProps)(Dashboard);
