add activeClassName in SiteNav component

This commit is contained in:
Ihor Orlovskyi 2016-12-09 00:45:12 +02:00
parent 512a7d471d
commit e469b2f9b5

View File

@ -10,15 +10,15 @@ class SiteNav extends React.Component {
<nav className='blog-nav'>
<ul>
<li>
<Link to="/" className={ location.pathname === prefixLink('/') ? "current" : null }> Articles
<Link to="/" activeClassName="current" onlyActiveOnIndex> Articles
</Link>
</li>
<li>
<Link to="/about/" className={ location.pathname === prefixLink('/about/') ? "current" : null }> About me
<Link to="/about/" activeClassName="current"> About me
</Link>
</li>
<li>
<Link to="/contact/" className={ location.pathname === prefixLink('/contact/') ? "current" : null }> Contact me
<Link to="/contact/" activeClassName="current"> Contact me
</Link>
</li>
</ul>