import React from 'react'; import { Helmet } from 'react-helmet'; import { RouteComponentProps, withRouter } from 'react-router'; import { withNamespaces, WithNamespaces } from 'react-i18next'; import ogpLogo from 'static/images/ogp-logo.png'; import { urlToPublic } from 'utils/helpers'; interface OwnProps { title: string; } type Props = OwnProps & RouteComponentProps & WithNamespaces; class BasicHead extends React.Component { render() { const { children, title, t } = this.props; const defaultOgpUrl = process.env.PUBLIC_HOST_URL + this.props.location.pathname; const defaultOgpImage = urlToPublic(ogpLogo); return (
{`ZF Grants - ${title}`} {/* open graph protocol defaults, can be overridden in children */} {/* */} {/* */} {/* twitter defaults, can be overridden in children */} {children}
); } } export default withNamespaces()(withRouter(BasicHead));