fix: respect color scheme in SSR
This commit is contained in:
parent
a27ff3acca
commit
58a48098e9
1 changed files with 7 additions and 0 deletions
7
gatsby-ssr.ts
Normal file
7
gatsby-ssr.ts
Normal file
|
|
@ -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()])
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue