Skip to content

Commit

Permalink
call it MenuLink to avoid confusion with react-router's Link component
Browse files Browse the repository at this point in the history
  • Loading branch information
karlkeefer committed Sep 4, 2021
1 parent 4cb18b1 commit 14d9355
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions react/src/Nav/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { LoggedIn, Anon } from 'Shared/Roles';
import './responsive.css'

// helper for semanticUI + react-router
const Link = props => (
const MenuLink = props => (
<NavLink
{...props}
activeClassName="active"
Expand All @@ -31,15 +31,15 @@ const Nav = () => {
<Container>
<Button id="toggler" fluid color='black' icon='sidebar' onClick={() => setOpen(!open)}/>
<Menu.Menu className={menuClass} position="left" id="override">
<Menu.Item as={Link} exact to="/" name="Home" />
<Menu.Item as={MenuLink} exact to="/" name="Home" />
<LoggedIn>
<Menu.Item as={Link} to="/posts" name="Posts" />
<Menu.Item as={MenuLink} to="/posts" name="Posts" />
</LoggedIn>
</Menu.Menu>
<Menu.Menu className={menuClass} position="right">
<Anon>
<Menu.Item as={Link} exact to={{pathname:"/login", state:{from:location}}} name="Log In" />
<Menu.Item as={Link} exact to="/signup" name="Sign Up" />
<Menu.Item as={MenuLink} exact to={{pathname:"/login", state:{from:location}}} name="Log In" />
<Menu.Item as={MenuLink} exact to="/signup" name="Sign Up" />
</Anon>
<LoggedIn>
<Menu.Item link={true} onClick={handleLogout} content="Log Out"/>
Expand Down

0 comments on commit 14d9355

Please sign in to comment.