1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 14:46:37 -04:00

revert stitches reset

This commit is contained in:
2022-07-08 15:36:43 -04:00
parent 54d0b6eac0
commit b5261e9f06

View File

@ -1,16 +1,8 @@
import { Html, Head, Main, NextScript } from "next/document";
import ThemeScript from "../components/ThemeScript/ThemeScript";
import { getCssText, reset, themeClassNames, themeStorageKey, preloadFonts } from "../lib/styles/stitches.config";
import { getCssText, themeClassNames, themeStorageKey, preloadFonts } from "../lib/styles/stitches.config";
import * as config from "../lib/config";
// ensure the server can handle multiple requests without accumulating previous visitors' stylesheets
// https://stitches.dev/blog/using-nextjs-with-stitches#step-3-ssr
const getCssAndReset = () => {
const css = getCssText();
reset();
return css;
};
// https://nextjs.org/docs/advanced-features/custom-document
const Document = () => {
return (
@ -31,7 +23,7 @@ const Document = () => {
/>
))}
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssAndReset() }} />
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssText() }} />
</Head>
<body>
<Main />