From cc3b03becb98902b027026081e01832b009e7507 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Wed, 8 Apr 2020 11:33:56 +0200 Subject: [PATCH] [examples] Fix next.js AMP support (#20463) --- docs/pages/_document.js | 6 +++--- examples/nextjs-with-typescript/pages/_document.tsx | 6 +++--- examples/nextjs/pages/_document.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/pages/_document.js b/docs/pages/_document.js index 12bb08fbea9f3c..b0718cae5129d9 100644 --- a/docs/pages/_document.js +++ b/docs/pages/_document.js @@ -1,6 +1,6 @@ import React from 'react'; import { ServerStyleSheets } from '@material-ui/styles'; -import Document, { Head, Main, NextScript } from 'next/document'; +import Document, { Html, Head, Main, NextScript } from 'next/document'; import { rewriteUrlForNextExport } from 'next/dist/next-server/lib/router/rewrite-url-for-export'; import { LANGUAGES_SSR } from 'docs/src/modules/constants'; import { pathnameToLanguage } from 'docs/src/modules/utils/helpers'; @@ -33,7 +33,7 @@ export default class MyDocument extends Document { const { canonical, userLanguage } = this.props; return ( - + {/* manifest.json provides metadata used when your web app is added to the @@ -92,7 +92,7 @@ export default class MyDocument extends Document { /> - + ); } } diff --git a/examples/nextjs-with-typescript/pages/_document.tsx b/examples/nextjs-with-typescript/pages/_document.tsx index 8eba0558edbc72..c77f4e323228cc 100644 --- a/examples/nextjs-with-typescript/pages/_document.tsx +++ b/examples/nextjs-with-typescript/pages/_document.tsx @@ -1,12 +1,12 @@ import React from 'react'; -import Document, { Head, Main, NextScript } from 'next/document'; +import Document, { Html, Head, Main, NextScript } from 'next/document'; import { ServerStyleSheets } from '@material-ui/core/styles'; import theme from '../src/theme'; export default class MyDocument extends Document { render() { return ( - + {/* PWA primary color */} @@ -19,7 +19,7 @@ export default class MyDocument extends Document {
- + ); } } diff --git a/examples/nextjs/pages/_document.js b/examples/nextjs/pages/_document.js index 8eba0558edbc72..c77f4e323228cc 100644 --- a/examples/nextjs/pages/_document.js +++ b/examples/nextjs/pages/_document.js @@ -1,12 +1,12 @@ import React from 'react'; -import Document, { Head, Main, NextScript } from 'next/document'; +import Document, { Html, Head, Main, NextScript } from 'next/document'; import { ServerStyleSheets } from '@material-ui/core/styles'; import theme from '../src/theme'; export default class MyDocument extends Document { render() { return ( - + {/* PWA primary color */} @@ -19,7 +19,7 @@ export default class MyDocument extends Document {
- + ); } }