import { getCookie, getCookies, setCookie } from 'cookies-next'; import { Html, Head, Main, NextScript, DocumentContext } from 'next/document' import { useUpdateTheme } from './_app'; import { darkTheme } from '../components/themes'; import { GetServerSidePropsContext } from 'next'; export default function Document(ctx: DocumentContext) { const updateTheme = useUpdateTheme(); return (