Files
DefectingCat.github.io/pages/_app.tsx
2022-03-22 11:55:03 +08:00

33 lines
871 B
TypeScript

import 'styles/globals.css';
import Head from 'next/head';
import { AppPropsWithLayout } from 'types';
import { ThemeProvider } from 'next-themes';
function MyApp({ Component, pageProps }: AppPropsWithLayout) {
const getLayout = Component.getLayout ?? ((page) => page);
return (
<>
<Head>
<link rel="shortcut icon" href="/images/img/favicon.webp" />
<meta name="keywords" content="Blog RUA" />
<meta name="description" content="Personal blog." />
<meta name="author" content="Arthur,i@rua.plus" />
<title>RUA</title>
</Head>
<ThemeProvider
attribute="class"
storageKey="rua-theme"
themes={['light', 'dark']}
enableSystem
defaultTheme="system"
>
{getLayout(<Component {...pageProps} />)}
</ThemeProvider>
</>
);
}
export default MyApp;