import { React, Document, Head, Main, NextScript } from '../common'; const glamor = require('glamor/server'); export default class RootDocument extends Document { public static async getInitialProps({ req, renderPage, query }: any) { // Flush glamour CSS. const page = renderPage(); const styles = glamor.renderStatic(() => page.html); return { ...page, ...styles }; } public render() { const props = this.props as any; return (