text: import React from "react";
  import PropTypes from "prop-types";
  import { useStaticQuery, graphql } from "gatsby";
  import styled from "styled-components";
  
  import Header from "./header";
  import Footer from "./Footer";
  
  import "../css/all.min.css";
  import "../css/main.css";
  
  const Layout = ({ children }) => {
    const data = useStaticQuery(graphql`
      query SiteTitleQuery {
        site {
          siteMetadata {
            title
          }
        }
      }
    `);
  
    return (
      <>
        <Header siteTitle={data.site.siteMetadata.title} />
        <DIV>
          <main>{children}</main>
          <Footer></Footer>
        </DIV>
      </>
    );
  };
  
  Layout.propTypes = {
    children: PropTypes.node.isRequired
  };
  
  export default Layout;
  
  const DIV = styled.div`
    margin: 0 auto;
    max-width: 1440px;
  `;
  