{"size": 746, "ext": "js", "max_stars_repo_path": "src/components/Layout.js", "max_stars_repo_name": "mishunia/gatsby-img-lighthouse", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/Layout.js", "max_issues_repo_name": "mishunia/gatsby-img-lighthouse", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/Layout.js", "max_forks_repo_name": "mishunia/gatsby-img-lighthouse", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 19.6315789474, "max_line_length": 49, "alphanum_fraction": 0.5254691689}
import React from "react"

import { ThemeProvider } from "styled-components"
import { StaticQuery, graphql } from "gatsby"

import theme from "./../themes/theme"
import Header from "./Header"
import Main from "./Main"

import GlobalStyles from "../common/GlobalStyles"

const Layout = ({ children }) => {
  return (
    <StaticQuery
      query={graphql`
        query SiteTitleQuery {
          site {
            siteMetadata {
              title
            }
          }
        }
      `}
      render={data => {
        return (
          <ThemeProvider theme={theme}>
            <GlobalStyles />
            <Header />
            <Main>{children}</Main>
          </ThemeProvider>
        )
      }}
    />
  )
}

export default Layout
