Last active
May 26, 2021 18:40
-
-
Save grahamd711/44250c718871632b4c9eaaa69a83fe67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import Helmet from 'react-helmet'; | |
import { StaticQuery, graphql } from 'gatsby'; | |
// Layout | |
import AppLayout, { Content } from 'components/app-layout'; | |
import Header from 'components/header'; | |
import HeaderNavigation from 'components/header-navigation'; | |
import AnnouncementBanner from 'components/announcement-banner'; | |
import Footer from 'components/footer'; | |
import AutoPilot from 'components/auto-pilot'; | |
import helmetConfig from './helmetConfig'; | |
const Layout = ({ children }) => { | |
return ( | |
<AppLayout> | |
<Helmet {...helmetConfig} /> | |
<AnnouncementBanner /> | |
<StaticQuery | |
query={query} | |
render={(data) => ( | |
<> | |
<Header> | |
<HeaderNavigation {...data} /> | |
</Header> | |
<Content>{children}</Content> | |
<AutoPilot /> | |
<Footer {...data} /> | |
</> | |
)} | |
/> | |
</AppLayout> | |
); | |
}; | |
const query = graphql` | |
{ | |
prismicNavigation { | |
data { | |
name | |
platform_description | |
product_links { | |
icon { | |
alt | |
url | |
localFile { | |
childImageSharp { | |
gatsbyImageData | |
} | |
} | |
} | |
product { | |
id | |
type | |
slug | |
uid | |
document { | |
... on PrismicProducts { | |
data { | |
name | |
} | |
} | |
} | |
} | |
text | |
} | |
product_secondary { | |
link_icon { | |
alt | |
url | |
localFile { | |
childImageSharp { | |
gatsbyImageData | |
} | |
} | |
} | |
text | |
link { | |
raw | |
} | |
} | |
platform_links { | |
icon { | |
alt | |
url | |
localFile { | |
childImageSharp { | |
gatsbyImageData | |
} | |
} | |
} | |
product { | |
id | |
type | |
slug | |
uid | |
} | |
text | |
} | |
solutions_description | |
solutions_links { | |
icon { | |
alt | |
url | |
localFile { | |
childImageSharp { | |
gatsbyImageData | |
} | |
} | |
} | |
solution { | |
id | |
type | |
slug | |
uid | |
} | |
text | |
} | |
solutions_vertical_links { | |
link_icon { | |
alt | |
url | |
localFile { | |
childImageSharp { | |
gatsbyImageData | |
} | |
} | |
} | |
text | |
link { | |
raw | |
} | |
} | |
learn_links { | |
icon { | |
alt | |
url | |
localFile { | |
childImageSharp { | |
gatsbyImageData | |
} | |
} | |
} | |
text | |
headline | |
link { | |
raw | |
} | |
} | |
partner_portal_description | |
partner_portal_links { | |
link_icon { | |
alt | |
url | |
localFile { | |
childImageSharp { | |
gatsbyImageData | |
} | |
} | |
} | |
text | |
description | |
link { | |
raw | |
} | |
} | |
resources_description | |
resources_collections { | |
icon { | |
alt | |
url | |
localFile { | |
childImageSharp { | |
gatsbyImageData | |
} | |
} | |
} | |
collection { | |
id | |
type | |
slug | |
uid | |
document { | |
... on PrismicArticleCollection { | |
data { | |
title | |
} | |
} | |
} | |
} | |
} | |
resources_links { | |
link_icon { | |
alt | |
url | |
localFile { | |
childImageSharp { | |
gatsbyImageData | |
} | |
} | |
} | |
text | |
link { | |
raw | |
} | |
} | |
footer_platform_links { | |
product { | |
document { | |
... on PrismicProducts { | |
type | |
uid | |
data { | |
name | |
} | |
} | |
} | |
} | |
} | |
footer_solutions_links { | |
solution { | |
document { | |
... on PrismicSolutionVertical { | |
type | |
uid | |
data { | |
name | |
} | |
} | |
} | |
} | |
} | |
company_links { | |
text | |
link { | |
raw | |
} | |
} | |
resource_center_links { | |
text | |
link { | |
raw | |
} | |
} | |
partners_links { | |
text | |
link { | |
raw | |
} | |
} | |
legal_links { | |
text | |
link { | |
url | |
} | |
} | |
copyright_text | |
bottom_links { | |
text | |
link { | |
raw | |
} | |
} | |
sign_up_form_url | |
} | |
} | |
} | |
`; | |
export default Layout; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment