Last active
April 6, 2020 10:58
-
-
Save theodesp/73fd82a6486413f7ad1197e17a6b1f8e 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 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> | |
</> | |
); | |
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