open-vault/website/pages/_document.js
Jonathan Neal 6550ba2b0e
Use HashiHead Component (#8549)
Co-authored-by: Jeff Escalante <jescalan@users.noreply.github.com>
2020-03-30 13:30:56 -04:00

28 lines
728 B
JavaScript

import Document, { Head, Main, NextScript } from 'next/document'
import HashiHead from '@hashicorp/react-head'
export default class MyDocument extends Document {
static async getInitialProps(ctx) {
const initialProps = await Document.getInitialProps(ctx)
return { ...initialProps }
}
render() {
return (
<html>
<HashiHead is={Head} />
<body>
<Main />
<NextScript />
<script
noModule
dangerouslySetInnerHTML={{
__html: `window.MSInputMethodContext && document.documentMode && document.write('<script src="/ie-custom-properties.js"><\\x2fscript>');`
}}
/>
</body>
</html>
)
}
}