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

34 lines
788 B
React
Raw Normal View History

2020-04-06 20:27:35 +00:00
import Subnav from '@hashicorp/react-subnav'
import subnavItems from '../../data/subnav'
import { useRouter } from 'next/router'
export default function ConsulSubnav() {
const router = useRouter()
return (
<Subnav
hideGithubStars={true}
2020-04-06 20:27:35 +00:00
titleLink={{
text: 'consul',
url: '/',
}}
ctaLinks={[
{
text: 'GitHub',
url: 'https://www.github.com/hashicorp/consul',
},
2020-04-06 20:27:35 +00:00
{ text: 'Download', url: '/downloads' },
{
text: 'Try Cloud',
url:
'https://cloud.hashicorp.com/?utm_source=consul_io&utm_content=top_nav_consul',
},
2020-04-06 20:27:35 +00:00
]}
currentPath={router.asPath}
2020-04-06 20:27:35 +00:00
menuItemsAlign="right"
menuItems={subnavItems}
constrainWidth
/>
)
}