diff options
| author | Jan Tuomi <jan.tuomi@valuemotive.com> | 2021-11-04 13:34:02 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@valuemotive.com> | 2021-11-04 13:34:02 +0200 |
| commit | 462b2fe10cf45da3dbcb5ee20ca6dfb79f46e6b6 (patch) | |
| tree | 2862938769f5c3e0efd57f5256dbdbb5452cdb4e /pages/_document.tsx | |
Initial commit
Diffstat (limited to 'pages/_document.tsx')
| -rw-r--r-- | pages/_document.tsx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pages/_document.tsx b/pages/_document.tsx new file mode 100644 index 0000000..8f33f41 --- /dev/null +++ b/pages/_document.tsx @@ -0,0 +1,22 @@ +import Document, { Html, Head, Main, NextScript, DocumentInitialProps, DocumentContext } from "next/document"; + +class MyDocument extends Document { + static async getInitialProps(ctx: DocumentContext): Promise<DocumentInitialProps> { + const initialProps = await Document.getInitialProps(ctx); + return { ...initialProps }; + } + + render(): JSX.Element { + return ( + <Html lang="en"> + <Head /> + <body> + <Main /> + <NextScript /> + </body> + </Html> + ); + } +} + +export default MyDocument;
\ No newline at end of file |
