import React from 'react'; import Helmet, { HelmetProps } from 'react-helmet'; import { useIntl } from 'gatsby-plugin-intl'; import { Location } from '@reach/router'; type Props = { /** Description text for the description meta tags */ description?: string; } & HelmetProps const socialAvatar = '/images/WH_Avatar_DarkBackground.webp' const socialAvatarSrc = process.env.GATSBY_SITE_URL + socialAvatar const socialAvatarHeight = '441' const socialAvatarWidth = '375' const socialLogo = '/images/WH_Logo_DarkBackground.webp' const socialLogoSrc = process.env.GATSBY_SITE_URL + socialLogo const socialLogoHeight = '543' const socialLogoWidth = '2193' /** * An SEO component that handles all element in the head that can accept */ const SEO: React.FC = ({ children, description = '', title }) => { const metaDescription = description; const intl = useIntl() return ( {({ location }) => ( {/* OG tags */} {/* "summary" is the type of twitter card. Hardcoded string is OK here. */} {/* PWA tags */} {children} )} ); }; export default SEO