feat(app): add dark/light theme switcher via next-themes

This commit is contained in:
2026-04-08 03:56:05 +02:00
parent 582bdbd901
commit bef3bb8fed
2 changed files with 28 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ import {
Scripts,
ScrollRestoration,
} from "react-router";
import { ThemeProvider } from "next-themes";
import type { Route } from "./+types/root";
import "./app.css";
@@ -34,11 +35,13 @@ export function Layout({ children }: { children: React.ReactNode }) {
<Links />
</head>
<body>
<TooltipProvider>
{children}
<ScrollRestoration />
<Scripts />
</TooltipProvider>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<TooltipProvider>
{children}
<ScrollRestoration />
<Scripts />
</TooltipProvider>
</ThemeProvider>
</body>
</html>
);