From 7b21fafe0fb26f1157a74e302c23200900b66279 Mon Sep 17 00:00:00 2001 From: chrisweb Date: Sat, 4 Jan 2020 20:26:22 +0100 Subject: [PATCH 1/2] moved meta tags from _document to _app --- examples/nextjs-with-typescript/pages/_app.tsx | 10 ++++++++++ .../nextjs-with-typescript/pages/_document.tsx | 15 +-------------- examples/nextjs/pages/_app.js | 10 ++++++++++ examples/nextjs/pages/_document.js | 15 +-------------- 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/examples/nextjs-with-typescript/pages/_app.tsx b/examples/nextjs-with-typescript/pages/_app.tsx index 0a2dea9778fd67..ad7c84d989fa52 100644 --- a/examples/nextjs-with-typescript/pages/_app.tsx +++ b/examples/nextjs-with-typescript/pages/_app.tsx @@ -20,7 +20,17 @@ export default class MyApp extends App { return ( + My page + {/* PWA primary color */} + + {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */} diff --git a/examples/nextjs-with-typescript/pages/_document.tsx b/examples/nextjs-with-typescript/pages/_document.tsx index 05473eab3d8473..2854265564f39d 100644 --- a/examples/nextjs-with-typescript/pages/_document.tsx +++ b/examples/nextjs-with-typescript/pages/_document.tsx @@ -1,25 +1,12 @@ import React from 'react'; import Document, { 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 */} - - - +
diff --git a/examples/nextjs/pages/_app.js b/examples/nextjs/pages/_app.js index dd776d9e7fc016..cf05ea2c2355a0 100644 --- a/examples/nextjs/pages/_app.js +++ b/examples/nextjs/pages/_app.js @@ -20,7 +20,17 @@ export default class MyApp extends App { return ( + My page + {/* PWA primary color */} + + {/* CssBaseline kickstart an elegant, consistent, and simple baseline to build upon. */} diff --git a/examples/nextjs/pages/_document.js b/examples/nextjs/pages/_document.js index 05473eab3d8473..2854265564f39d 100644 --- a/examples/nextjs/pages/_document.js +++ b/examples/nextjs/pages/_document.js @@ -1,25 +1,12 @@ import React from 'react'; import Document, { 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 */} - - - +
From 0b0c2ac9edc922d7c1ae1e976fc01fab8b992951 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Sat, 4 Jan 2020 23:23:14 +0100 Subject: [PATCH 2/2] move the minimum --- docs/pages/_document.js | 5 ----- docs/src/modules/components/Head.js | 5 +++++ .../create-react-app-with-typescript/public/index.html | 2 +- examples/create-react-app/public/index.html | 2 +- examples/nextjs-with-typescript/pages/_app.tsx | 8 +------- examples/nextjs-with-typescript/pages/_document.tsx | 10 +++++++++- examples/nextjs/pages/_app.js | 8 +------- examples/nextjs/pages/_document.js | 10 +++++++++- examples/preact/public/index.html | 2 +- examples/ssr/server.js | 3 +-- 10 files changed, 29 insertions(+), 26 deletions(-) diff --git a/docs/pages/_document.js b/docs/pages/_document.js index 0c19a78b474f54..ebbfb63104724e 100644 --- a/docs/pages/_document.js +++ b/docs/pages/_document.js @@ -35,11 +35,6 @@ export default class MyDocument extends Document { return ( - {/* Use minimum-scale=1 to enable GPU rasterization. */} - {/* manifest.json provides metadata used when your web app is added to the homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/ diff --git a/docs/src/modules/components/Head.js b/docs/src/modules/components/Head.js index 8b14f98ff33047..201ba8eae61ad9 100644 --- a/docs/src/modules/components/Head.js +++ b/docs/src/modules/components/Head.js @@ -12,6 +12,11 @@ export default function Head(props) { return ( + {/* Use minimum-scale=1 to enable GPU rasterization. */} + {title} {/* Twitter */} diff --git a/examples/create-react-app-with-typescript/public/index.html b/examples/create-react-app-with-typescript/public/index.html index 079d36adb3be60..1be5fcdacef506 100644 --- a/examples/create-react-app-with-typescript/public/index.html +++ b/examples/create-react-app-with-typescript/public/index.html @@ -3,7 +3,7 @@ - + +