colouring-montreal/app/src/frontend/header.js

57 lines
2.2 KiB
JavaScript
Raw Normal View History

2018-10-02 16:48:13 -04:00
import React, { Fragment } from 'react';
import { NavLink } from 'react-router-dom';
import Logo from './logo';
import './header.css';
/**
* Main Header
*/
2018-10-02 16:48:13 -04:00
const Header = (props) => (
<header className="main-header">
<nav className="navbar navbar-light navbar-expand-md">
<Logo />
<ul className="navbar-nav ml-auto">
<li className="nav-item">
<a className="nav-link" href="https://pages.colouring.london">Hello</a>
</li>
<li className="nav-item">
<a className="nav-link" href="https://pages.colouring.london/about">More about</a>
</li>
<li className="nav-item">
<NavLink to="/map/date_year.html" className="nav-link">View Maps</NavLink>
</li>
<li className="nav-item">
<a className="nav-link" href="https://pages.colouring.london/buildingcategories">Building Categories</a>
</li>
<li className="nav-item">
<a className="nav-link" href="https://pages.colouring.london/whoisinvolved">Who's Involved?</a>
</li>
<li className="nav-item">
<a className="nav-link" href="https://discuss.colouring.london">Discuss</a>
</li>
{
props.user?
(
<li className="nav-item">
<NavLink to="/my-account.html" className="nav-link">My account (Logged in as {props.user.username})</NavLink>
</li>
):
(
<Fragment>
<li className="nav-item">
<NavLink to="/login.html" className="nav-link">Log in</NavLink>
</li>
<li className="nav-item">
<NavLink to="/sign-up.html" className="nav-link">Sign up</NavLink>
</li>
2018-10-02 16:48:13 -04:00
</Fragment>
)
}
</ul>
</nav>
</header>
);
export default Header;