AG-2177 React Example - allow force refresh (routing breaks)

This commit is contained in:
Sean Landsman
2018-10-16 16:07:35 +01:00
parent 3debbabe28
commit 518a95ee89
5 changed files with 9 additions and 4 deletions

View File

@@ -6,8 +6,8 @@ import {Link, Route} from 'react-router-dom'
export default function NavItem({children, to, exact}) {
return (
<Route path={to} exact={exact} children={({match}) => (
<li className={match ? 'active' : null}>
<Link to={to}>{children}</Link>
<li className="nav-item">
<Link className={match ? 'nav-link active' : 'nav-link'} to={to}>{children}</Link>
</li>
)}/>
)