Files
threshold/website/components/subnav/index.jsx
T

32 lines
768 B
React
Raw Normal View History

2020-07-16 14:57:02 -04:00
import Subnav from '@hashicorp/react-subnav'
import { useRouter } from 'next/router'
import subnavItems from 'data/navigation'
import { productSlug } from 'data/metadata'
2020-09-24 20:12:13 -04:00
import Link from 'next/link'
2020-07-16 14:57:02 -04:00
export default function ProductSubnav() {
const router = useRouter()
return (
<Subnav
titleLink={{
2020-09-23 12:50:02 -07:00
text: 'Boundary',
2020-07-16 14:57:02 -04:00
url: '/',
}}
ctaLinks={[
{
text: 'GitHub',
url: `https://www.github.com/hashicorp/${productSlug}`,
},
{
text: 'Download',
url: 'https://github.com/hashicorp/boundary/releases',
},
2020-07-16 14:57:02 -04:00
]}
currentPath={router.pathname}
menuItemsAlign="right"
menuItems={subnavItems}
constrainWidth
2020-09-24 20:12:13 -04:00
Link={Link}
2020-07-16 14:57:02 -04:00
/>
)
}