Created
August 7, 2018 18:53
-
-
Save darde/b0b1a52b4f44b9d4bb3428541ed1cfc9 to your computer and use it in GitHub Desktop.
react-i18next-example/src/components/Home/index.jsx
This file contains 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 { translate } from 'react-i18next'; | |
import photo from './photo.jpg'; | |
const Home = ({ t }) => ( | |
<div className='preview'> | |
<h1>{t('home.title')}</h1> | |
<div> | |
<figure className='center'> | |
<img src={photo} alt={t('home.figure.alt')} /> | |
</figure> | |
</div> | |
<p className='center'>{t('home.content')}</p> | |
</div> | |
); | |
export default translate('common')(Home); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment