2017-07-16 20:19:45 +00:00
|
|
|
import React from 'react'
|
|
|
|
import Link from 'next/link'
|
|
|
|
|
|
|
|
import PureComponent from '../components/PureComponent'
|
|
|
|
import ExtendedComponent from '../components/ExtendedComponent'
|
2018-03-05 11:46:13 +00:00
|
|
|
import ComponentWithTrans from '../components/ComponentWithTrans'
|
|
|
|
import { withI18next } from '../lib/withI18next'
|
2017-07-16 20:19:45 +00:00
|
|
|
|
2018-08-24 07:49:10 +00:00
|
|
|
const TestContent = withI18next(['home', 'common'])(({ t, initialI18nStore }) => (
|
2018-03-05 11:46:13 +00:00
|
|
|
<div>
|
|
|
|
<h1>{t('welcome')}</h1>
|
|
|
|
<p>{t('common:integrates_react-i18next')}</p>
|
2018-08-24 07:49:10 +00:00
|
|
|
<p>{t('sample_test')}</p>
|
|
|
|
<div>
|
|
|
|
<button>{t('sample_button')}</button>
|
|
|
|
</div>
|
2018-03-05 11:46:13 +00:00
|
|
|
<PureComponent t={t} />
|
|
|
|
<ExtendedComponent />
|
|
|
|
<ComponentWithTrans />
|
|
|
|
<Link href='/page2'>
|
|
|
|
<a>{t('link.gotoPage2')}</a>
|
|
|
|
</Link>
|
2018-08-24 07:49:10 +00:00
|
|
|
<br />
|
|
|
|
<Link href='/page3'>
|
|
|
|
<a>{t('link.gotoPage3')}</a>
|
|
|
|
</Link>
|
2018-03-05 11:46:13 +00:00
|
|
|
</div>
|
|
|
|
))
|
2018-08-24 07:49:10 +00:00
|
|
|
|
|
|
|
const Test = () => {
|
|
|
|
return <TestContent />
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Test
|