Created
September 3, 2019 13:41
-
-
Save fwojciec/e060aec1861dccc528806ab5e2551282 to your computer and use it in GitHub Desktop.
How to build a multilingual website in Next.js #9
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
// components/Artist.tsx | |
import React from 'react' | |
import useTranslation from '../hooks/useTranslation' | |
const Artist: React.FC = () => { | |
const { locale, t } = useTranslation() | |
return ( | |
<div> | |
<h1>René Magritte</h1> | |
<img src="/static/img/magritte.jpg" alt="Rene Magritte" /> | |
<p>{t('bio')}</p> | |
<a href={`http://${locale}.wikipedia.org/wiki/René_Magritte`}>{t('readMore')}</a> | |
</div> | |
) | |
} | |
export default Artist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment