mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
29 lines
890 B
TypeScript
29 lines
890 B
TypeScript
import Document, { Html, Head, Main, NextScript } from 'next/document';
|
|
import type { DocumentContext, DocumentInitialProps } from 'next/document';
|
|
|
|
class MyDocument extends Document {
|
|
static async getInitialProps(ctx: DocumentContext): Promise<DocumentInitialProps> {
|
|
const initialProps = await Document.getInitialProps(ctx);
|
|
return { ...initialProps };
|
|
}
|
|
|
|
render(): JSX.Element {
|
|
return (
|
|
<Html lang="en">
|
|
<Head>
|
|
<link rel="dns-prefetch" href="//fonts.gstatic.com" />
|
|
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://www.google-analytics.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="true" />
|
|
</Head>
|
|
<body>
|
|
<Main />
|
|
<NextScript />
|
|
</body>
|
|
</Html>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default MyDocument;
|