2022-10-17 23:37:01 +08:00
|
|
|
import '@/css/tailwind.css';
|
|
|
|
import '@/css/prism.css';
|
|
|
|
import 'katex/dist/katex.css';
|
2022-07-17 21:40:41 +08:00
|
|
|
|
2022-10-17 23:37:01 +08:00
|
|
|
import '@fontsource/inter/variable.css';
|
2022-07-17 21:40:41 +08:00
|
|
|
|
2022-10-17 23:37:01 +08:00
|
|
|
import { ThemeProvider } from 'next-themes';
|
|
|
|
import type { AppProps } from 'next/app';
|
|
|
|
import Head from 'next/head';
|
2022-07-17 21:40:41 +08:00
|
|
|
|
2022-10-17 23:37:01 +08:00
|
|
|
import siteMetadata from '@/data/siteMetadata';
|
|
|
|
import Analytics from '@/components/analytics';
|
|
|
|
import LayoutWrapper from '@/components/LayoutWrapper';
|
|
|
|
import { ClientReload } from '@/components/ClientReload';
|
2022-07-17 21:40:41 +08:00
|
|
|
|
2022-10-17 23:37:01 +08:00
|
|
|
const isDevelopment = process.env.NODE_ENV === 'development';
|
|
|
|
const isSocket = process.env.SOCKET;
|
2022-07-17 21:40:41 +08:00
|
|
|
|
2022-10-07 13:55:39 +08:00
|
|
|
export default function App({ Component, pageProps }: AppProps) {
|
2022-07-17 21:40:41 +08:00
|
|
|
return (
|
|
|
|
<ThemeProvider attribute="class" defaultTheme={siteMetadata.theme}>
|
|
|
|
<Head>
|
|
|
|
<meta content="width=device-width, initial-scale=1" name="viewport" />
|
|
|
|
</Head>
|
|
|
|
{isDevelopment && isSocket && <ClientReload />}
|
|
|
|
<Analytics />
|
|
|
|
<LayoutWrapper>
|
|
|
|
<Component {...pageProps} />
|
|
|
|
</LayoutWrapper>
|
|
|
|
</ThemeProvider>
|
2022-10-17 23:37:01 +08:00
|
|
|
);
|
2022-07-17 21:40:41 +08:00
|
|
|
}
|