mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-09-17 23:25:31 -04:00
revert stitches reset
This commit is contained in:
+2
-10
@@ -1,16 +1,8 @@
|
|||||||
import { Html, Head, Main, NextScript } from "next/document";
|
import { Html, Head, Main, NextScript } from "next/document";
|
||||||
import ThemeScript from "../components/ThemeScript/ThemeScript";
|
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";
|
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
|
// https://nextjs.org/docs/advanced-features/custom-document
|
||||||
const Document = () => {
|
const Document = () => {
|
||||||
return (
|
return (
|
||||||
@@ -31,7 +23,7 @@ const Document = () => {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssAndReset() }} />
|
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssText() }} />
|
||||||
</Head>
|
</Head>
|
||||||
<body>
|
<body>
|
||||||
<Main />
|
<Main />
|
||||||
|
|||||||
Reference in New Issue
Block a user