2017-02-24 21:45:18 +00:00
|
|
|
import React from 'react'
|
2018-12-17 16:34:32 +00:00
|
|
|
import { defineMessages, injectIntl } from 'react-intl'
|
2017-02-24 21:45:18 +00:00
|
|
|
import Head from 'next/head'
|
|
|
|
import Nav from './Nav'
|
|
|
|
|
|
|
|
const messages = defineMessages({
|
|
|
|
title: {
|
|
|
|
id: 'title',
|
|
|
|
defaultMessage: 'React Intl Next.js Example'
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2018-12-17 16:34:32 +00:00
|
|
|
export default injectIntl(({ intl, title, children }) => (
|
2017-02-24 21:45:18 +00:00
|
|
|
<div>
|
|
|
|
<Head>
|
|
|
|
<meta name='viewport' content='width=device-width, initial-scale=1' />
|
|
|
|
<title>{title || intl.formatMessage(messages.title)}</title>
|
|
|
|
</Head>
|
|
|
|
|
|
|
|
<header>
|
|
|
|
<Nav />
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
))
|