mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-20 21:01:18 -04:00
detatch theme provider from stitches logic
This commit is contained in:
@@ -1,16 +1,12 @@
|
||||
import { Html, Head, Main, NextScript } from "next/document";
|
||||
import ThemeScript from "../components/ThemeScript";
|
||||
import { getCssText, themeClassNames, themeStorageKey } from "../lib/styles/stitches.config";
|
||||
import { getCssText, theme } from "../lib/styles/stitches.config";
|
||||
import * as config from "../lib/config";
|
||||
|
||||
// https://nextjs.org/docs/advanced-features/custom-document
|
||||
const Document = () => {
|
||||
return (
|
||||
<Html lang={config.siteLocale} className={themeClassNames["light"]}>
|
||||
<Html lang={config.siteLocale} className={theme.className}>
|
||||
<Head>
|
||||
{/* inject this script (generated at build-time) to prioritize setting/restoring the user's theme. */}
|
||||
<ThemeScript key="restore-theme-js" {...{ themeClassNames, themeStorageKey }} />
|
||||
|
||||
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssText() }} />
|
||||
</Head>
|
||||
<body>
|
||||
|
Reference in New Issue
Block a user