_document refactoring + ts

This commit is contained in:
tmshv committed 2020-02-12 23:28:42 +03:00
1 parent effaf07ecb
commit 5071b0292d
1 file changed
+4 -12
+4 -12
View File
@@ -1,20 +1,12 @@
import React from 'react'
import Document, { Html, Head, Main, NextScript } from 'next/document'
import { YMetrika } from '../src/components/YMetrika'
import { GAnalytics } from '../src/components/GAnalytics'
import { YMetrika } from 'src/components/YMetrika'
import { GAnalytics } from 'src/components/GAnalytics'
export default class MyDocument extends Document {
// static async getInitialProps(ctx) {
// const initialProps = await Document.getInitialProps(ctx);
// return { ...initialProps };
// }
render() {
return (
<Html>
<Head>
<style>{`body { margin: 0 } /* custom! */`}</style>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, maximum-scale=1.0" />
<meta name="referrer" content="unsafe-url" />
@@ -62,11 +54,11 @@ export default class MyDocument extends Document {
<GAnalytics account={'UA-60209057-1'} />
</Head>
<body className="custom_class">
<body>
<Main />
<NextScript />
</body>
</Html>
);
)
}
}