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

33 lines
752 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',
2020-10-12 15:56:27 -07:00
url: '/downloads',
},
2020-07-16 14:57:02 -04:00
]}
2020-10-09 16:26:32 -04:00
currentPath={router.asPath}
2020-07-16 14:57:02 -04:00
menuItemsAlign="right"
menuItems={subnavItems}
constrainWidth
2020-09-24 20:12:13 -04:00
Link={Link}
matchOnBasePath
2020-07-16 14:57:02 -04:00
/>
)
}