text: import React from "react"
  import PropTypes from "prop-types"
  // import { useStaticQuery, graphql } from "gatsby"
  import HeaderTransition from "./HeaderTransition"
  import styled from "styled-components"
  
  // smooth-scroll
  // refer to https://www.npmjs.com/package/smooth-scroll
  if (typeof window !== "undefined") {
    // eslint-disable-next-line global-require
    require("smooth-scroll")('a[href*="#"]')
  }
  
  const Content = styled.main`
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 1500px;
    margin: 0 auto;
  `
  
  const Layout = ({ children }) => {
    /* const data = useStaticQuery(graphql`
      query SiteTitleQuery {
        site {
          siteMetadata {
            title
          }
        }
      }
    `) */
  
    return (
      <>
        {/* <Header siteTitle={data.site.siteMetadata.title} /> */}
        <HeaderTransition />
        <div>
          <Content>{children}</Content>
        </div>
      </>
    )
  }
  
  Layout.propTypes = {
    children: PropTypes.node.isRequired,
  }
  
  export default Layout
  