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 (