2016-03-12 01:28:19 +03:00
|
|
|
import React from 'react'
|
|
|
|
import { RouteHandler, Link } from 'react-router'
|
2016-06-03 02:32:38 +03:00
|
|
|
import { prefixLink } from 'gatsby-helpers'
|
|
|
|
import './style.css'
|
2016-03-12 01:28:19 +03:00
|
|
|
|
2016-06-03 14:05:50 +03:00
|
|
|
class SiteNav extends React.Component {
|
2016-03-21 20:03:01 +03:00
|
|
|
render() {
|
|
|
|
const {location} = this.props
|
|
|
|
return (
|
|
|
|
<nav className='blog-nav'>
|
|
|
|
<ul>
|
|
|
|
<li>
|
2016-06-03 02:32:38 +03:00
|
|
|
<Link to="/" className={ location.pathname === prefixLink('/') ? "current" : null }> Articles
|
2016-03-21 20:03:01 +03:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
2016-08-24 14:52:28 -07:00
|
|
|
<Link to="/about/" className={ location.pathname === prefixLink('/about/') ? "current" : null }> About me
|
2016-03-21 20:03:01 +03:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
2016-08-24 14:52:28 -07:00
|
|
|
<Link to="/contact/" className={ location.pathname === prefixLink('/contact/') ? "current" : null }> Contact me
|
2016-03-21 20:03:01 +03:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
);
|
|
|
|
}
|
2016-03-12 01:28:19 +03:00
|
|
|
}
|
|
|
|
|
2016-06-03 14:05:50 +03:00
|
|
|
SiteNav.propTypes = {
|
2016-03-21 20:03:01 +03:00
|
|
|
location: React.PropTypes.object,
|
2016-03-12 01:28:19 +03:00
|
|
|
}
|
|
|
|
|
2016-06-03 14:05:50 +03:00
|
|
|
export default SiteNav
|