import NextDocument, { Html, Head, Main, NextScript, DocumentContext } from 'next/document' import { getCssText } from '../styles' import { GA_TRACKING_ID } from '../utils/gtag' const APP_NAME = 'tldraw' const APP_DESCRIPTION = 'A tiny little drawing app.' const APP_URL = 'https://tldraw.com' class MyDocument extends NextDocument { static async getInitialProps(ctx: DocumentContext): Promise<{ styles: JSX.Element html: string head?: JSX.Element[] }> { try { const initialProps = await NextDocument.getInitialProps(ctx) return { ...initialProps, styles: ( <> {initialProps.styles}