{"size": 2059, "ext": "js", "max_stars_repo_path": "src/components/common/header/Header.js", "max_stars_repo_name": "remus-selea/scentdb-react-front", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/common/header/Header.js", "max_issues_repo_name": "remus-selea/scentdb-react-front", "max_issues_repo_issues_event_min_datetime": "2021-09-26T19:40:06.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-29T16:40:26.000Z", "max_forks_repo_path": "src/components/common/header/Header.js", "max_forks_repo_name": "remus-selea/scentdb-react-front", "max_forks_repo_forks_event_min_datetime": "2021-11-18T19:22:12.000Z", "max_forks_repo_forks_event_max_datetime": "2021-11-18T19:22:12.000Z"}
{"max_stars_count": null, "max_issues_count": 26, "max_forks_count": 1, "avg_line_length": 31.196969697, "max_line_length": 113, "alphanum_fraction": 0.5196697426}
import React from 'react';
import { Link } from "react-router-dom";
import { AiOutlineUser } from "react-icons/ai";
import { Button } from 'primereact/button';
import { isUserAuthenticated } from '../../../util/authUtils';

import './Header.scss';

function Header(props) {

  const isAuthenticated = isUserAuthenticated();

  return (
    <div className="container">
      <header className="header ">

        <nav className="nav-menu">

          <div className="nav-item-list">
            <div className="nav-item logo">
              <Link className="nav-link" to="/">
                <div className="nav-item-text">ScentDB</div></Link>
            </div>
            <div className="nav-item">
              <Link className="nav-link" to="/perfumes"> <div className="nav-item-text">PERFUMES</div></Link>
            </div>
            <div className="nav-item">
              <Link className="nav-link" to="/notes"><div className="nav-item-text">NOTES</div> </Link>
            </div>
            <div className="nav-item">
              <Link className="nav-link" to="/perfumers"> <div className="nav-item-text">PERFUMERS</div>  </Link>
            </div>
            <div className="nav-item">
              <Link className="nav-link" to="/brands"> <div className="nav-item-text">BRANDS</div> </Link>
            </div>
          </div>

        </nav>

        <nav className="nav-user-actions">
          <ul className="nav-item-list nav-item-list-actions">
            <li className="nav-item-user-action">

              <Link className="add-company-link"
                to={{
                  pathname: (isAuthenticated ? "/profile" : "/login")
                }}
              >
                <Button
                  type="button"
                  icon={<AiOutlineUser className="user-icon" />}
                  className='custom-user-btn p-button-rounded p-button-text p-button-plain'
                />
              </Link>

            </li>
          </ul>
        </nav>
      </header>

    </div>
  );
}

export default Header;
