2017-02-25 14:54:42 +00:00
|
|
|
import Link from 'next/link'
|
2017-01-22 12:27:06 +00:00
|
|
|
|
|
|
|
export default ({ pathname }) => (
|
|
|
|
<header>
|
2017-02-25 14:54:42 +00:00
|
|
|
<Link prefetch href='/'>
|
2017-01-22 12:27:06 +00:00
|
|
|
<a className={pathname === '/' && 'is-active'}>Home</a>
|
|
|
|
</Link>
|
|
|
|
|
2017-02-25 14:54:42 +00:00
|
|
|
<Link prefetch href='/about'>
|
2017-01-22 12:27:06 +00:00
|
|
|
<a className={pathname === '/about' && 'is-active'}>About</a>
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
<style jsx>{`
|
|
|
|
header {
|
|
|
|
margin-bottom: 25px;
|
|
|
|
}
|
|
|
|
a {
|
|
|
|
font-size: 14px;
|
|
|
|
margin-right: 15px;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
.is-active {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
|
|
|
`}</style>
|
|
|
|
</header>
|
|
|
|
)
|