import IfActive from '../../IfActive';
import HeadSection from '../HeadSection';
const HeadMeta = function HeadMeta(props) {
  const {
    seo,
    publishPath
  } = props;
  return <HeadSection>
      <IfActive active={seo}>
        <title key="title">{seo?.title}</title>
      </IfActive>

      <IfActive active={publishPath}>
        <meta key="og:url" property="og:url" content={`https://www.politico.com${publishPath}`} />
        <link key="canonical" rel="canonical" href={`https://www.politico.com${publishPath}`} />
      </IfActive>
      <meta name="viewport" content={'minimum-scale=1, initial-scale=1, ' + 'width=device-width, shrink-to-fit=no'} />
    </HeadSection>;
};
export default HeadMeta;