{"size": 515, "ext": "js", "max_stars_repo_path": "client/components/navbar.js", "max_stars_repo_name": "JARED-J/Harmony", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/components/navbar.js", "max_issues_repo_name": "JARED-J/Harmony", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/components/navbar.js", "max_forks_repo_name": "JARED-J/Harmony", "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": 16.6129032258, "max_line_length": 40, "alphanum_fraction": 0.6485436893}
import React from 'react'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'
//import {Link} from 'react-router-dom'
import {SideBar} from './index'

const Navbar = ({isLoggedIn}) => (
  <div>
    <h1>Welcome To Harmony</h1>
    {isLoggedIn && <SideBar />}
  </div>
)

/**
 * CONTAINER
 */
const mapState = state => {
  return {
    isLoggedIn: !!state.user.id
  }
}

export default connect(mapState)(Navbar)

/**
 * PROP TYPES
 */
Navbar.propTypes = {
  isLoggedIn: PropTypes.bool.isRequired
}
