mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
dbb1b732a0
- simplify pages by introducing withI18next hoc - add Trans component example - replace <div> with <p> in demo components to make text on pages easier to read German translation by @marinaroot
21 lines
621 B
JavaScript
21 lines
621 B
JavaScript
import React from 'react'
|
|
import Link from 'next/link'
|
|
|
|
import PureComponent from '../components/PureComponent'
|
|
import ExtendedComponent from '../components/ExtendedComponent'
|
|
import ComponentWithTrans from '../components/ComponentWithTrans'
|
|
import { withI18next } from '../lib/withI18next'
|
|
|
|
export default withI18next(['home', 'common'])(({ t, initialI18nStore }) => (
|
|
<div>
|
|
<h1>{t('welcome')}</h1>
|
|
<p>{t('common:integrates_react-i18next')}</p>
|
|
<PureComponent t={t} />
|
|
<ExtendedComponent />
|
|
<ComponentWithTrans />
|
|
<Link href='/page2'>
|
|
<a>{t('link.gotoPage2')}</a>
|
|
</Link>
|
|
</div>
|
|
))
|