Skip to content

Commit

Permalink
Relay example: fix "Missing Document Components" Next.js error
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnzlml authored and kodiakhq[bot] committed Dec 19, 2021
1 parent f2e2c6f commit c1de0a7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/example-relay/src/pages/_document.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// @flow

import type { Node, Element } from 'react';
import Document, { Head, Main, NextScript, type DocumentContext } from 'next/document';
// $FlowFixMe[missing-export]
import Document, { Html, Head, Main, NextScript, type DocumentContext } from 'next/document';
import sx from '@adeira/sx';

import { mediaStyles } from '../components/Media';
Expand All @@ -21,7 +22,7 @@ export default class MyDocument extends Document {

render(): Element<'html'> {
return (
<html lang="en-US">
<Html lang="en-US">
<Head>
<link rel="icon" href="https://adeira.dev/img/favicon.ico" />
<style dangerouslySetInnerHTML={{ __html: mediaStyles }} />
Expand All @@ -30,7 +31,7 @@ export default class MyDocument extends Document {
<Main />
<NextScript />
</body>
</html>
</Html>
);
}
}

0 comments on commit c1de0a7

Please sign in to comment.