diff --git a/gatsby-ssr.ts b/gatsby-ssr.ts new file mode 100644 index 0000000..5215fac --- /dev/null +++ b/gatsby-ssr.ts @@ -0,0 +1,7 @@ +import React from "react" +import { GatsbySSR } from "gatsby" +import { getInitColorSchemeScript } from "@mui/material" + +export const onRenderBody: GatsbySSR["onRenderBody"] = ({ setPreBodyComponents }) => { + setPreBodyComponents([getInitColorSchemeScript()]) +}