import React from "react"; import PropTypes from "prop-types"; import { Helmet } from "react-helmet"; import { useStaticQuery, graphql } from "gatsby"; interface MetaProps { name: string; content: string; } interface SEOProps { description: string; lang: string; meta: MetaProps[]; title: string; } function SEO({ description, lang, meta, title }: SEOProps): React.ReactElement { const { site } = useStaticQuery( graphql` query { site { siteMetadata { title description author } } } ` ); const metaDescription = description || site.siteMetadata.description; return ( ); } SEO.defaultProps = { lang: `en`, meta: [], description: ``, }; SEO.propTypes = { description: PropTypes.string, lang: PropTypes.string, meta: PropTypes.arrayOf(PropTypes.object), title: PropTypes.string.isRequired, }; export default SEO;