Files
threshold/website/pages/_app.js
T

54 lines
1.9 KiB
JavaScript
Raw Normal View History

2020-07-16 14:57:02 -04:00
import './style.css'
import '@hashicorp/nextjs-scripts/lib/nprogress/style.css'
import NProgress from '@hashicorp/nextjs-scripts/lib/nprogress'
import createConsentManager from '@hashicorp/nextjs-scripts/lib/consent-manager'
import useAnchorLinkAnalytics from '@hashicorp/nextjs-scripts/lib/anchor-link-analytics'
2020-10-12 15:56:27 -07:00
import HashiStackMenu from '@hashicorp/react-hashi-stack-menu'
2020-07-16 14:57:02 -04:00
import Router from 'next/router'
import HashiHead from '@hashicorp/react-head'
import Head from 'next/head'
import { ErrorBoundary } from '@hashicorp/nextjs-scripts/lib/bugsnag'
import ProductSubnav from '../components/subnav'
import Footer from 'components/footer'
import Error from './_error'
2020-10-12 15:56:27 -07:00
import AlertBanner from '@hashicorp/react-alert-banner'
import alertBannerData, { ALERT_BANNER_ACTIVE } from 'data/alert-banner'
2020-07-16 14:57:02 -04:00
NProgress({ Router })
const { ConsentManager, openConsentManager } = createConsentManager({
preset: 'oss',
})
2020-10-12 22:36:42 -07:00
const title = 'Boundary by HashiCorp'
const description =
'Boundary is an open source solution that automates a secure identity-based user access to hosts and services across environments.'
2020-12-16 16:43:06 -05:00
export default function App({ Component, pageProps }) {
2020-07-16 14:57:02 -04:00
useAnchorLinkAnalytics()
return (
<ErrorBoundary FallbackComponent={Error}>
2020-10-12 15:56:27 -07:00
<HashiHead
is={Head}
2020-10-12 22:36:42 -07:00
title={title}
siteName={title}
description={description}
2020-10-12 15:56:27 -07:00
image="https://www.boundaryproject.io/img/og-image.png"
2021-05-03 10:02:13 -07:00
icon={[{ href: '/_favicon.ico' }]}
2020-10-12 22:36:42 -07:00
>
<meta name="og:title" property="og:title" content={title} />
<meta name="og:description" property="og:title" content={description} />
</HashiHead>
2020-12-16 16:43:06 -05:00
{ALERT_BANNER_ACTIVE && (
2021-05-03 10:02:13 -07:00
<AlertBanner {...alertBannerData} product="boundary" />
2020-12-16 16:43:06 -05:00
)}
2020-10-12 15:56:27 -07:00
<HashiStackMenu />
<ProductSubnav />
<div className="content">
<Component {...pageProps} />
</div>
<Footer openConsentManager={openConsentManager} />
<ConsentManager />
2020-07-16 14:57:02 -04:00
</ErrorBoundary>
)
}