ui/ add dark and light mode toggle
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { ThemeProvider } from "@/components/theme-provider";
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import "./globals.css";
|
||||
@@ -15,7 +16,8 @@ const geistMono = Geist_Mono({
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Next.js Full-Stack Boilerplate",
|
||||
description: "Complete Next.js starter template with authentication, database, AI integration, and modern tooling by Leon van Zyl",
|
||||
description:
|
||||
"Complete Next.js starter template with authentication, database, AI integration, and modern tooling by Leon van Zyl",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
@@ -24,12 +26,19 @@ export default function RootLayout({
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang="en" className="dark">
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
<SiteHeader />
|
||||
{children}
|
||||
<ThemeProvider
|
||||
attribute="class"
|
||||
defaultTheme="system"
|
||||
enableSystem
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<SiteHeader />
|
||||
{children}
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user