Fixed active link

This commit is contained in:
Syrus Akbary 2015-11-29 23:18:09 -08:00
parent a556ab89f4
commit c589d73d07

View File

@ -14,7 +14,7 @@ class Template extends React.Component {
return ( return (
<div> <div>
<Menu width={200} right> <Menu width={200} right>
<span><Link to="/playground/">Try it out</Link></span> <span><Link to="/playground/" className={path.indexOf('/playground')==0?"active":null}>Try it out</Link></span>
<span><Link to="/docs/quickstart/" className={path.indexOf('/docs')==0?"active":null}>Docs</Link></span> <span><Link to="/docs/quickstart/" className={path.indexOf('/docs')==0?"active":null}>Docs</Link></span>
<span><Link to="/community/">Community</Link></span> <span><Link to="/community/">Community</Link></span>
<a href="https://github.com/graphql-python/graphene/">Github</a> <a href="https://github.com/graphql-python/graphene/">Github</a>
@ -26,7 +26,7 @@ class Template extends React.Component {
Graphene Graphene
</Link> </Link>
<nav className="header-nav"> <nav className="header-nav">
<Link to="/playground/">Try it out</Link> <Link to="/playground/" className={path.indexOf('/playground')==0?"active":null}>Try it out</Link>
<Link to="/docs/quickstart/" className={path.indexOf('/docs')==0?"active":null}>Docs</Link> <Link to="/docs/quickstart/" className={path.indexOf('/docs')==0?"active":null}>Docs</Link>
<Link to="/community/">Community</Link> <Link to="/community/">Community</Link>
<a href="https://github.com/graphql-python/graphene/">Github</a> <a href="https://github.com/graphql-python/graphene/">Github</a>