{"size": 841, "ext": "js", "max_stars_repo_path": "src/components/Seo.js", "max_stars_repo_name": "HaithamKhadra/Personal-website", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/Seo.js", "max_issues_repo_name": "HaithamKhadra/Personal-website", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/Seo.js", "max_forks_repo_name": "HaithamKhadra/Personal-website", "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.5581395349, "max_line_length": 64, "alphanum_fraction": 0.5422116528}
import { useStaticQuery, graphql } from "gatsby";
import React from "react";
import { Helmet } from "react-helmet";

const query = graphql`
  {
    site {
      siteMetadata {
        title
        description
        author
        person {
          name
          age
        }
      }
    }
  }
`;

const Seo = ({ title, description, schemaMarkup }) => {
  const { site } = useStaticQuery(query);
  const metaDesc = description || site.siteMetadata.description;

  return (
    <Helmet
      htmlAttributes={{
        lang: "en",
      }}
      title={`${title} | ${site.siteMetadata.title}`}
      meta={[{ name: "description", content: metaDesc }]}
    >
      {schemaMarkup && (
        <script type="application/ld+json">
          {JSON.stringify(schemaMarkup)}
        </script>
      )}
    </Helmet>
  );
};

export default Seo;
