import React from 'react';
import { Button, Container, Nav, Navbar } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
+import { useLocation } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import Icon from './Icon';
import { withUser } from '../../helpers/UserContext';
const Header = ({ doLogout, user }) => {
+ const { pathname } = useLocation();
const { t } = useTranslation();
return <Navbar id="header" bg="dark" variant="dark">
ALttP
</Navbar.Brand>
</LinkContainer>
- <Nav>
+ <Nav activeKey={pathname}>
<LinkContainer to="/tournaments/6">
<Nav.Link href="/tournaments/6">
ALttPR Weekly
</Nav.Link>
</LinkContainer>
</Nav>
- <Nav className="ms-auto">
+ <Nav activeKey={pathname} className="ms-auto">
<LinkContainer to="/tech">
<Nav.Link href="/tech">
{t('menu.tech')}