1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/with-react-uwp/pages/_document.js
myxvisual 9da6524d30 Feature add react uwp example (#2375)
* feat: Add react-uwp examples

* fix: remove log from ThemeWrapper

* feat: Add README.md

* fix: Fixed right version

* fix: Use JavaScript Standard Style

* fix: Fixed wrong next version
2017-06-27 21:10:26 +02:00

31 lines
952 B
JavaScript

import React from 'react'
import PropTypes from 'prop-types'
import Document, { Head, Main, NextScript } from 'next/document'
export default class MyDocument extends Document {
static async getInitialProps ({ req }) {
return req
? { userAgent: req.headers['user-agent'] }
: { userAgent: navigator.userAgent }
}
static contextTypes = { theme: PropTypes.object };
render () {
return (
<html lang='en'>
<Head>
<title>My page</title>
<meta charSet='utf-8' />
<meta name='viewport' content='user-scalable=0, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height' />
<meta name='theme-color' content='yellowgreen' />
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Roboto:300,400,500' />
</Head>
<body>
<Main />
<NextScript />
</body>
</html>
)
}
}