2017-02-24 21:45:18 +00:00
|
|
|
import React from 'react'
|
2018-07-21 23:37:25 +00:00
|
|
|
import {FormattedMessage, FormattedNumber, defineMessages, injectIntl} from 'react-intl'
|
2017-02-24 21:45:18 +00:00
|
|
|
import Head from 'next/head'
|
|
|
|
import Layout from '../components/Layout'
|
|
|
|
|
|
|
|
const {description} = defineMessages({
|
|
|
|
description: {
|
|
|
|
id: 'description',
|
|
|
|
defaultMessage: 'An example app integrating React Intl with Next.js'
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2018-07-21 23:37:25 +00:00
|
|
|
export default injectIntl(({intl}) => (
|
2017-02-24 21:45:18 +00:00
|
|
|
<Layout>
|
|
|
|
<Head>
|
|
|
|
<meta name='description' content={intl.formatMessage(description)} />
|
|
|
|
</Head>
|
|
|
|
<p>
|
|
|
|
<FormattedMessage id='greeting' defaultMessage='Hello, World!' />
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<FormattedNumber value={1000} />
|
|
|
|
</p>
|
|
|
|
</Layout>
|
|
|
|
))
|