text: /**
   * Layout component that queries for data
   * with Gatsby's useStaticQuery component
   *
   * See: https://www.gatsbyjs.com/docs/use-static-query/
   */
  
  import React from "react"
  import PropTypes from "prop-types"
  import { useStaticQuery, graphql } from "gatsby"
  
  import "./layout.css"
  import Header from "./header"
  import styled from "styled-components"
  
  const Layout = ({ children }) => {
    const data = useStaticQuery(graphql`
      query SiteTitleQuery {
        site {
          siteMetadata {
            title
          }
        }
      }
    `)
  
    return (
      <>
        <Header />
        <main>{children}</main>
        <Footer>© {new Date().getFullYear()} +design</Footer>
      </>
    )
  }
  
  Layout.propTypes = {
    children: PropTypes.node.isRequired,
  }
  
  export default Layout
  
  const Footer = styled.footer`
    background-color: #000;
    height: 200px;
  
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
  `
  