github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/pages/_app.js (about) 1 import './style.css' 2 import '@hashicorp/nextjs-scripts/lib/nprogress/style.css' 3 4 import Router from 'next/router' 5 import Head from 'next/head' 6 import NProgress from '@hashicorp/nextjs-scripts/lib/nprogress' 7 import { ErrorBoundary } from '@hashicorp/nextjs-scripts/lib/bugsnag' 8 import createConsentManager from '@hashicorp/nextjs-scripts/lib/consent-manager' 9 import useAnchorLinkAnalytics from '@hashicorp/nextjs-scripts/lib/anchor-link-analytics' 10 import HashiStackMenu from '@hashicorp/react-hashi-stack-menu' 11 import AlertBanner from '@hashicorp/react-alert-banner' 12 import HashiHead from '@hashicorp/react-head' 13 import Footer from 'components/footer' 14 import ProductSubnav from 'components/subnav' 15 import Error from './_error' 16 import alertBannerData, { ALERT_BANNER_ACTIVE } from 'data/alert-banner' 17 18 NProgress({ Router }) 19 const { ConsentManager, openConsentManager } = createConsentManager({ 20 preset: 'oss', 21 }) 22 23 export default function App({ Component, pageProps }) { 24 useAnchorLinkAnalytics() 25 26 return ( 27 <ErrorBoundary FallbackComponent={Error}> 28 <HashiHead 29 is={Head} 30 title="Nomad by HashiCorp" 31 siteName="Nomad by HashiCorp" 32 description="Nomad is a highly available, distributed, data-center aware cluster and application scheduler designed to support the modern datacenter with support for long-running services, batch jobs, and much more." 33 image="https://www.nomadproject.io/img/og-image.png" 34 icon={[{ href: '/favicon.ico' }]} 35 /> 36 {ALERT_BANNER_ACTIVE && ( 37 <AlertBanner {...alertBannerData} theme="nomad" /> 38 )} 39 <HashiStackMenu /> 40 <ProductSubnav /> 41 <div className={`content${ALERT_BANNER_ACTIVE ? ' banner' : ''}`}> 42 <Component {...pageProps} /> 43 </div> 44 <Footer openConsentManager={openConsentManager} /> 45 <ConsentManager /> 46 </ErrorBoundary> 47 ) 48 }