removes custom document
This commit is contained in:
parent
69462632a5
commit
00d9146895
5 changed files with 80 additions and 78 deletions
|
@ -1,76 +0,0 @@
|
|||
import NextDocument, { Html, Head, Main, NextScript, DocumentContext } from 'next/document'
|
||||
import { getCssText } from '-styles'
|
||||
import { GA_TRACKING_ID } from '-utils/gtag'
|
||||
|
||||
class MyDocument extends NextDocument {
|
||||
static async getInitialProps(ctx: DocumentContext) {
|
||||
const initialProps = await NextDocument.getInitialProps(ctx)
|
||||
|
||||
return {
|
||||
...initialProps,
|
||||
styles: (
|
||||
<>
|
||||
{initialProps.styles}
|
||||
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssText() }} />
|
||||
</>
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
const APP_NAME = 'tldraw'
|
||||
const APP_DESCRIPTION = 'A tiny little drawing app.'
|
||||
const APP_URL = 'https://tldraw.com'
|
||||
|
||||
return (
|
||||
<Html lang="en">
|
||||
<Head>
|
||||
<meta name="application-name" content={APP_NAME} />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
||||
<meta name="apple-mobile-web-app-title" content={APP_NAME} />
|
||||
<meta name="description" content={APP_DESCRIPTION} />
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="theme-color" content="#fafafa" />
|
||||
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:url" content={APP_URL} />
|
||||
<meta name="twitter:title" content={APP_NAME} />
|
||||
<meta name="twitter:description" content={APP_DESCRIPTION} />
|
||||
<meta name="twitter:creator" content="@steveruizok" />
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content={APP_NAME} />
|
||||
<meta property="og:description" content={APP_DESCRIPTION} />
|
||||
<meta property="og:site_name" content={APP_NAME} />
|
||||
<meta property="og:url" content={APP_URL} />
|
||||
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png" />
|
||||
|
||||
<script async src={`https://www.googletagmanager.com/gtag/js?id=${GA_TRACKING_ID}`} />
|
||||
<script
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '${GA_TRACKING_ID}', {
|
||||
page_path: window.location.pathname,
|
||||
});
|
||||
`,
|
||||
}}
|
||||
/>
|
||||
</Head>
|
||||
<body>
|
||||
<Main />
|
||||
<NextScript />
|
||||
</body>
|
||||
</Html>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default MyDocument
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
78
packages/www/public/x_document.tsx
Normal file
78
packages/www/public/x_document.tsx
Normal file
|
@ -0,0 +1,78 @@
|
|||
// import NextDocument, { Html, Head, Main, NextScript, DocumentContext } from 'next/document'
|
||||
// import { getCssText } from '-styles'
|
||||
// import { GA_TRACKING_ID } from '-utils/gtag'
|
||||
|
||||
// class MyDocument extends NextDocument {
|
||||
// static async getInitialProps(ctx: DocumentContext) {
|
||||
// const initialProps = await NextDocument.getInitialProps(ctx)
|
||||
|
||||
// return {
|
||||
// ...initialProps,
|
||||
// styles: (
|
||||
// <>
|
||||
// {initialProps.styles}
|
||||
// <style id="stitches" dangerouslySetInnerHTML={{ __html: getCssText() }} />
|
||||
// </>
|
||||
// ),
|
||||
// }
|
||||
// }
|
||||
|
||||
// render(): JSX.Element {
|
||||
// const APP_NAME = 'tldraw'
|
||||
// const APP_DESCRIPTION = 'A tiny little drawing app.'
|
||||
// const APP_URL = 'https://tldraw.com'
|
||||
|
||||
// return (
|
||||
// <Html lang="en">
|
||||
// <Head>
|
||||
// <meta name="application-name" content={APP_NAME} />
|
||||
// <meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
// <meta name="apple-mobile-web-app-status-bar-style" content="black" />
|
||||
// <meta name="apple-mobile-web-app-title" content={APP_NAME} />
|
||||
// <meta name="description" content={APP_DESCRIPTION} />
|
||||
// <meta name="format-detection" content="telephone=no" />
|
||||
// <meta name="mobile-web-app-capable" content="yes" />
|
||||
// <meta name="theme-color" content="#fafafa" />
|
||||
|
||||
// <meta name="twitter:card" content="summary" />
|
||||
// <meta name="twitter:url" content={APP_URL} />
|
||||
// <meta name="twitter:title" content={APP_NAME} />
|
||||
// <meta name="twitter:description" content={APP_DESCRIPTION} />
|
||||
// <meta name="twitter:creator" content="@steveruizok" />
|
||||
|
||||
// <meta property="og:type" content="website" />
|
||||
// <meta property="og:title" content={APP_NAME} />
|
||||
// <meta property="og:description" content={APP_DESCRIPTION} />
|
||||
// <meta property="og:site_name" content={APP_NAME} />
|
||||
// <meta property="og:url" content={APP_URL} />
|
||||
|
||||
// <link rel="manifest" href="/manifest.json" />
|
||||
// <link rel="shortcut icon" href="/favicon.ico" />
|
||||
// <link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png" />
|
||||
|
||||
// <script async src={`https://www.googletagmanager.com/gtag/js?id=${GA_TRACKING_ID}`} />
|
||||
// <script
|
||||
// dangerouslySetInnerHTML={{
|
||||
// __html: `
|
||||
// window.dataLayer = window.dataLayer || [];
|
||||
// function gtag(){dataLayer.push(arguments);}
|
||||
// gtag('js', new Date());
|
||||
// gtag('config', '${GA_TRACKING_ID}', {
|
||||
// page_path: window.location.pathname,
|
||||
// });
|
||||
// `,
|
||||
// }}
|
||||
// />
|
||||
// </Head>
|
||||
// <body>
|
||||
// <Main />
|
||||
// <NextScript />
|
||||
// </body>
|
||||
// </Html>
|
||||
// )
|
||||
// }
|
||||
// }
|
||||
|
||||
// export default MyDocument
|
||||
|
||||
export {}
|
Loading…
Reference in a new issue