summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/_app.tsx4
-rw-r--r--pages/_document.tsx5
2 files changed, 7 insertions, 2 deletions
diff --git a/pages/_app.tsx b/pages/_app.tsx
index 5d682c5c..3dcf9aa3 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -1,9 +1,11 @@
import { ChakraProvider } from '@chakra-ui/react'
+import theme from '../lib/theme.tsx'
import type { AppProps } from 'next/app'
+
function MyApp({ Component, pageProps }: AppProps) {
return (
- <ChakraProvider>
+ <ChakraProvider theme={theme}>
<Component {...pageProps} />
</ChakraProvider>
)
diff --git a/pages/_document.tsx b/pages/_document.tsx
index e2f593fb..ef9fcd3b 100644
--- a/pages/_document.tsx
+++ b/pages/_document.tsx
@@ -1,10 +1,13 @@
-import { Html, Head, Main, NextScript } from 'next/document'
+import { ColorModeScript } from '@chakra-ui/react'
+import NextDocument, { Html, Head, Main, NextScript } from 'next/document'
+import theme from '../lib/theme'
export default function Document() {
return (
<Html lang="en">
<Head />
<body>
+ <ColorModeScript initialColorMode={theme.config.initialColorMode} />
<Main />
<NextScript />
</body>