mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-11 15:16:28 +08:00
feat: update theme provider to dynamic
This commit is contained in:
+5
-1
@@ -1,8 +1,12 @@
|
||||
import type { AppProps } from 'next/app';
|
||||
import { ThemeProvider } from '@/styles';
|
||||
import dynamic from 'next/dynamic';
|
||||
|
||||
import '../../public/globals.css';
|
||||
|
||||
const ThemeProvider = dynamic(() => import('@/styles/themeProvider'), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
function MyApp({ Component, pageProps }: AppProps) {
|
||||
return (
|
||||
<ThemeProvider>
|
||||
|
||||
@@ -75,3 +75,5 @@ export const ThemeProvider = ({
|
||||
</ThemeContext.Provider>
|
||||
);
|
||||
};
|
||||
|
||||
export default ThemeProvider;
|
||||
|
||||
Reference in New Issue
Block a user