"...git@git.astron.nl:astron-sdc/ldv-specification.git" did not exist on "187b786a1f70b6655d8973878ba28a89542ea1fd"
Newer
Older
import React, { useContext } from "react";
import { Navbar, Nav } from "react-bootstrap";
import { NavLink } from "react-router-dom";
import AuthControl from "./auth/authControl";
import { QueryContext } from "../contexts/QueryContext";
const { config } = useContext(QueryContext);
if (!config) return null;
// construct the navigation bar based on the configuration
const navlist = config.navbar;
return (
<Navbar bg="dark" variant="dark">
<img
alt=""
src={config.logo}
height="40"
className="d-inline-block align-top"
/>
<Navbar.Brand href="/">{config.title}</Navbar.Brand>
<Nav className="mr-auto">
{navlist.map((nav) => (
<Nav.Link key={nav.title} as={NavLink} to={nav.route}>
{nav.title}
</Nav.Link>
))}
</Nav>
<Nav>
<AuthControl />
</Nav>
</Navbar>
);
}