Changes:
- Add next-themes dependency for theme management
- Create ThemeProvider wrapper for app root layout
- Set dark mode as default theme
- Create ThemeToggle component with Sun/Moon icons
- Add theme toggle to home page navigation
- Add theme toggle to dashboard header
- App now starts in dark mode with ability to switch to light mode
Styling uses existing Tailwind dark mode variables configured in
tailwind.config.ts and globals.css. All existing components automatically
support dark theme.
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
26 lines
706 B
TypeScript
26 lines
706 B
TypeScript
import type { Metadata } from "next"
|
|
import "./globals.css"
|
|
import { AuthProvider } from "@/lib/auth-context"
|
|
import { ThemeProvider } from "@/lib/theme-provider"
|
|
|
|
export const metadata: Metadata = {
|
|
title: "E-Voting - Plateforme de Vote Électronique Sécurisée",
|
|
description: "Plateforme de vote électronique sécurisée par cryptographie post-quantique",
|
|
}
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode
|
|
}) {
|
|
return (
|
|
<html lang="fr" suppressHydrationWarning>
|
|
<body>
|
|
<ThemeProvider attribute="class" defaultTheme="dark" enableSystem>
|
|
<AuthProvider>{children}</AuthProvider>
|
|
</ThemeProvider>
|
|
</body>
|
|
</html>
|
|
)
|
|
}
|