Last active
April 6, 2020 11:19
-
-
Save theodesp/b784a33639a569c66844af2fef5ee17d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import { withTranslation } from 'react-i18next'; | |
import { Head } from '@wapps/gatsby-plugin-i18next'; | |
import { PhraseAppInitializer } from 'react-i18next-phraseapp'; | |
import Header from './header'; | |
import './layout.css'; | |
const Layout = ({ children, data, t }) => ( | |
<> | |
<Head hreflang> | |
<title>{t('Gatsby I18next')}</title> | |
<meta name="description" content="Example Gatsby site with i18next" /> | |
<meta name="keywords" content="gatsby, react, i18next" /> | |
</Head> | |
<Header siteTitle={t('This is Gatsby with I18next')} /> | |
<div | |
style={{ | |
margin: '0 auto', | |
maxWidth: 960, | |
padding: '0px 1.0875rem 1.45rem', | |
paddingTop: 0, | |
}} | |
> | |
{children} | |
</div> | |
<PhraseAppInitializer /> | |
</> | |
); | |
Layout.propTypes = { | |
children: PropTypes.node.isRequired, | |
}; | |
export default withTranslation()(Layout); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment