text: /**
   * Layout component that queries for data
   * with Gatsby's StaticQuery component
   *
   * See: https://www.gatsbyjs.org/docs/static-query/
   */
  
  import React from "react"
  import PropTypes from "prop-types"
  import { StaticQuery, graphql } from "gatsby"
  import { ThemeProvider } from 'styled-components'
  import GlobalStyle from './styles/GlobalStyle'
  import theme from './styles/theme'
  import Header from './Header'
  import Footer from './Footer'
  import ModalFooter from './ModalFooter'
  
  const Layout = ({ children }) => (
    <StaticQuery
      query={graphql`
        query SiteTitleQuery {
          site {
            siteMetadata {
              title
            }
          }
        }
      `}
      render={data => (
        <ThemeProvider
          theme={theme}
        >
          <>
            <GlobalStyle />
              <Header />
              <main role="main">{children}</main>
              <ModalFooter />
              <Footer />
              
          </>
        </ThemeProvider>
      )}
    />
  )
  
  Layout.propTypes = {
    children: PropTypes.node.isRequired,
  }
  
  export default Layout
  