2017-11-23 12:48:34 +00:00
|
|
|
import Link from 'next/link'
|
2018-11-08 13:42:55 +00:00
|
|
|
|
2017-11-23 12:48:34 +00:00
|
|
|
const links = [
|
2018-11-08 13:42:55 +00:00
|
|
|
{ href: 'https://github.com/zeit/next.js', label: 'Github' },
|
|
|
|
{ href: 'https://nextjs.org/docs', label: 'Docs' }
|
|
|
|
]
|
2017-11-23 12:48:34 +00:00
|
|
|
|
2018-11-08 13:42:55 +00:00
|
|
|
export default function Nav () {
|
|
|
|
return <nav>
|
|
|
|
<ul className='flex justify-between items-center p-8'>
|
|
|
|
<li className='list-reset'>
|
2017-11-25 11:03:25 +00:00
|
|
|
<Link prefetch href='/'>
|
2018-11-08 13:42:55 +00:00
|
|
|
<a className='text-blue no-underline'>Home</a>
|
2017-11-23 12:48:34 +00:00
|
|
|
</Link>
|
|
|
|
</li>
|
2018-11-08 13:42:55 +00:00
|
|
|
<ul className='flex justify-between items-center'>
|
2017-11-23 12:48:34 +00:00
|
|
|
{links.map(
|
2018-11-08 13:42:55 +00:00
|
|
|
({ href, label }) => (
|
|
|
|
<li key={`${href}${label}`} className='list-reset ml-4'>
|
2017-11-23 12:48:34 +00:00
|
|
|
<Link href={href}>
|
2018-11-08 13:42:55 +00:00
|
|
|
<a className='btn-blue no-underline'>{label}</a>
|
2017-11-23 12:48:34 +00:00
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
)
|
|
|
|
)}
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2018-11-08 13:42:55 +00:00
|
|
|
}
|