open-nomad/website/pages/_document.js

28 lines
729 B
JavaScript
Raw Normal View History

2020-02-06 23:45:31 +00:00
import Document, { Head, Main, NextScript } from 'next/document'
2020-03-16 17:10:31 +00:00
import HashiHead from '@hashicorp/react-head'
2020-02-06 23:45:31 +00:00
export default class MyDocument extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx)
return { ...initialProps }
}
render() {
return (
<html>
2020-03-16 17:10:31 +00:00
<HashiHead is={Head} />
2020-02-06 23:45:31 +00:00
<body>
<Main />
<NextScript />
<script
noModule
dangerouslySetInnerHTML={{
2020-09-30 13:48:40 +00:00
__html: `window.MSInputMethodContext && document.documentMode && document.write('<script src="/ie-custom-properties.js"><\\x2fscript>');`,
2020-02-06 23:45:31 +00:00
}}
/>
</body>
</html>
)
}
}