Skip to content

Instantly share code, notes, and snippets.

@theodesp
Last active April 6, 2020 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theodesp/b784a33639a569c66844af2fef5ee17d to your computer and use it in GitHub Desktop.
Save theodesp/b784a33639a569c66844af2fef5ee17d to your computer and use it in GitHub Desktop.
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