Files
transform/pages/_document.tsx
T
Ritesh Kumar 9f67f97573 2.1.0 (#128)
* HTML to Pug converter (#127)

* feat(pug): add HTML to pug converter

* fix(pug): added package details

* feat(analyze): added webpack bundle analyzer

*  fix(rust): handle special characters and duplicate keys (#131)

* remove duplicate google tag manager (#122)

* Update _app.tsx (#124)

* docs: add timneutkens as a contributor (#125)

* docs: update README.md

* docs: update .all-contributorsrc

* Upgrade Next.js to 9 (#126)

* Upgrade Next.js to 9

* Add back engines key

* Add globalObject

Brings in suggestion from https://github.com/zeit/next.js/issues/7873#issuecomment-512795482

* Add temporary fix for window issue

* fix(font): add fallback font for non mac browsers (#130)

closes #129

* fix(rust): handle special characters and duplicate keys

closes #97

* fix(rust): handle special chars

closes #97, closes #95, closes #89, closes #62

* chore(rust): remove settings

* feat(kotlin): added JSON to kotlin and json schema

* fixes

* fixes

* fixes

* fixes

* fixes

* added favicon

* social media tags
2019-07-25 00:38:09 +05:30

71 lines
1.8 KiB
TypeScript

import React from "react";
import Document, { Head, Main, NextScript } from "next/document";
import { extractStyles } from "evergreen-ui";
interface DocumentProps {
css: string;
hydrationScript: React.ReactChild;
}
export default class MyDocument extends Document<DocumentProps> {
static getInitialProps({ renderPage }) {
const page = renderPage();
const { css, hydrationScript } = extractStyles();
return {
...page,
css,
hydrationScript
};
}
render() {
const { css, hydrationScript } = this.props;
return (
<html>
<Head>
<meta charSet="utf-8" />
<meta
name="google-site-verification"
content="bjJSOEahdert-7mwVScrwTTUVR3nSe0bEj5YjevUNn0"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="/static/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/static/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/static/favicon-16x16.png"
/>
<link rel="manifest" href="/static/site.webmanifest" />
<meta
property="og:title"
content="Transform | A polyglot web converter"
/>
/
<meta property="og:image" content="/static/transform.png" />
<meta property="og:url" content="https://transform.tools" />
<meta name="twitter:card" content="summary_large_image" />
<style dangerouslySetInnerHTML={{ __html: css }} />
</Head>
<body>
<Main />
{hydrationScript}
<NextScript />
</body>
</html>
);
}
}