import { graphql, useStaticQuery } from "gatsby" import React, { FC } from "react" import { Helmet } from "react-helmet" interface ISEOProps { readonly description?: string readonly lang?: string readonly meta?: any[] readonly keywords?: string[] readonly title: string } export const SEO: FC = ({ description, lang = "en", meta = [], keywords = [], title, }) => { const { site } = useStaticQuery( graphql` query { site { siteMetadata { title description author } } } ` ) const metaDescription = description || site.siteMetadata.description return ( 0 ? { name: `keywords`, content: keywords.join(`, `), } : [] ) .concat(meta)} /> ) }