feat(theme): wrap application in ThemeProvider for improved theme management

This commit is contained in:
cfngc4594 2025-02-19 21:20:25 +08:00
parent 273c8e6b67
commit 7c6c196cb2

View File

@ -1,6 +1,7 @@
import "./globals.css";
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { ThemeProvider } from "@/components/theme-provider";
const geistSans = Geist({
variable: "--font-geist-sans",
@ -26,8 +27,15 @@ export default function RootLayout({
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
</ThemeProvider>
</body>
</html>
);