import React from 'react' import Document, { Head, Main, NextScript } from 'next/document' import { getDefaultContext, setDefaultContext } from '../styles/createDefaultContext' export default class MyDocument extends Document { static async getInitialProps (ctx) { setDefaultContext() const page = ctx.renderPage() const styleContext = getDefaultContext() return { ...page, styles: