open-nomad/website/components/subnav/index.jsx

24 lines
571 B
React
Raw Normal View History

2020-02-14 15:11:37 +00:00
import Subnav from '@hashicorp/react-subnav'
import subnavItems from '../../data/subnav'
2020-02-14 15:11:37 +00:00
import { useRouter } from 'next/router'
2020-02-06 23:45:31 +00:00
2020-02-14 15:11:37 +00:00
export default function NomadSubnav() {
const router = useRouter()
return (
<Subnav
titleLink={{
text: 'nomad',
2020-03-26 00:01:29 +00:00
url: '/',
2020-02-14 15:11:37 +00:00
}}
ctaLinks={[
{ text: 'GitHub', url: 'https://www.github.com/hashicorp/nomad' },
2020-03-26 00:01:29 +00:00
{ text: 'Download', url: '/downloads' },
2020-02-14 15:11:37 +00:00
]}
currentPath={router.pathname}
menuItemsAlign="right"
menuItems={subnavItems}
2020-03-26 00:01:29 +00:00
constrainWidth
2020-02-14 15:11:37 +00:00
/>
)
2020-02-06 23:45:31 +00:00
}