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:
@ -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 />
|
||||
|
Reference in New Issue
Block a user