{"size": 1135, "ext": "js", "max_stars_repo_path": "src/components/layout.js", "max_stars_repo_name": "JViktoRArtola/gatsby-hotel", "max_stars_repo_stars_event_min_datetime": "2021-01-22T20:40:58.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-22T20:40:58.000Z", "max_issues_repo_path": "src/components/layout.js", "max_issues_repo_name": "JViktoRArtola/gatsby-hotel", "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": "JViktoRArtola/gatsby-hotel", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 26.3953488372, "max_line_length": 121, "alphanum_fraction": 0.6414096916}
/**
 * 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 Header from "./header"
import { Helmet } from "react-helmet"
import Footer from "./footer"
import useSeo from "../hooks/useSeo"

const Layout = ({ children }) => {
  const seo = useSeo()
  const { fallbackSeo: { description, title } } = seo
  return (
    <>
      <Helmet htmlAttributes={{
        lang: "en"
      }}>
        <title>{title}</title>
        <meta name='description' content={description}/>
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css"
              integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w=="
              crossOrigin="anonymous"/>
      </Helmet>
      <Header title={title}/>
      <div>
        <main>{children}</main>
        <Footer title={title}/>
      </div>
    </>
  )
}

Layout.propTypes = {
  children: PropTypes.node.isRequired
}

export default Layout
