text: import React from "react"
  import PropTypes from "prop-types"
  import { graphql, useStaticQuery } from "gatsby"
  import { Box } from "@chakra-ui/react"
  
  import Header from "./header"
  import "./layout.css"
  
  const Layout = ({ children }) => {
    const data = useStaticQuery(graphql`
      query SiteTitleQuery {
        site {
          siteMetadata {
            title
          }
        }
      }
    `)
  
    return (
      <>
        <Header siteTitle={data.site.siteMetadata?.title || `Title`} />
        <Box margin={"0 auto"} maxWidth={960} padding={`0 1.0875rem 1.45rem`}>
          <Box>{children}</Box>
        </Box>
      </>
    )
  }
  
  Layout.propTypes = {
    children: PropTypes.node.isRequired
  }
  
  export default Layout
  