import React from "react"; import NextDocument, { Html, Head, Main, NextScript } from "next/document"; import { ColorModeScript } from "@chakra-ui/react"; import { GA_TRACKING_ID, IS_PRODUCTION } from "../src/constants/globals"; export default class Document extends NextDocument { render() { return (
{/* enable analytics script only for production */} {IS_PRODUCTION && ( <> > )} {/* Make Color mode to persists when you refresh the page. */}