open-nomad/website/components/subnav/index.jsx
2021-07-27 16:11:46 -05:00

25 lines
591 B
JavaScript

import Subnav from '@hashicorp/react-subnav'
import subnavItems from '../../data/subnav'
import { useRouter } from 'next/router'
export default function NomadSubnav() {
const router = useRouter()
return (
<Subnav
titleLink={{
text: 'nomad',
url: '/',
}}
ctaLinks={[
{ text: 'GitHub', url: 'https://www.github.com/hashicorp/nomad' },
{ text: 'Download', url: '/downloads' },
]}
currentPath={router.asPath}
menuItemsAlign="right"
menuItems={subnavItems}
constrainWidth
matchOnBasePath
/>
)
}