mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2024-12-29 00:08:20 +01:00
480cf55663
gatsby@0.12.5 enforces trailing slashes https://github.com/gatsbyjs/gatsby/pull/378
34 lines
1.0 KiB
JavaScript
34 lines
1.0 KiB
JavaScript
import React from 'react'
|
|
import { RouteHandler, Link } from 'react-router'
|
|
import { prefixLink } from 'gatsby-helpers'
|
|
import './style.css'
|
|
|
|
class SiteNav extends React.Component {
|
|
render() {
|
|
const {location} = this.props
|
|
return (
|
|
<nav className='blog-nav'>
|
|
<ul>
|
|
<li>
|
|
<Link to="/" className={ location.pathname === prefixLink('/') ? "current" : null }> Articles
|
|
</Link>
|
|
</li>
|
|
<li>
|
|
<Link to="/about/" className={ location.pathname === prefixLink('/about/') ? "current" : null }> About me
|
|
</Link>
|
|
</li>
|
|
<li>
|
|
<Link to="/contact/" className={ location.pathname === prefixLink('/contact/') ? "current" : null }> Contact me
|
|
</Link>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
);
|
|
}
|
|
}
|
|
|
|
SiteNav.propTypes = {
|
|
location: React.PropTypes.object,
|
|
}
|
|
|
|
export default SiteNav |