4337801152
Refactored for future code maintainability. Also added in default to dark theme and adjusted some styling on the toggle switch.
16 lines
342 B
TypeScript
16 lines
342 B
TypeScript
import '../styles/globals.css'
|
|
import type { AppProps } from 'next/app'
|
|
import {ThemeProvider} from 'next-themes'
|
|
|
|
function MyApp({ Component, pageProps }: AppProps) {
|
|
return (
|
|
<>
|
|
<ThemeProvider attribute="class" defaultTheme="dark">
|
|
<Component {...pageProps} />
|
|
</ThemeProvider>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default MyApp
|