Fix SSR flickering
This commit is contained in:
@@ -18,6 +18,9 @@ import ChanjeTem from '../components/chanje-tem'
|
|||||||
import NextAppDirEmotionCacheProvider from './emotion-cache-provider'
|
import NextAppDirEmotionCacheProvider from './emotion-cache-provider'
|
||||||
|
|
||||||
const theme = createTheme({
|
const theme = createTheme({
|
||||||
|
cssVariables: {
|
||||||
|
colorSchemeSelector: 'class'
|
||||||
|
},
|
||||||
colorSchemes: {
|
colorSchemes: {
|
||||||
light: {
|
light: {
|
||||||
palette: {
|
palette: {
|
||||||
@@ -66,7 +69,7 @@ export default function ThemeRegistry(props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<InitColorSchemeScript />
|
<InitColorSchemeScript attribute='class' />
|
||||||
<PlausibleProvider domain='oki.re'>
|
<PlausibleProvider domain='oki.re'>
|
||||||
<NextAppDirEmotionCacheProvider options={{key: 'mui'}}>
|
<NextAppDirEmotionCacheProvider options={{key: 'mui'}}>
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
|
|||||||
Reference in New Issue
Block a user