layout.jsx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { Geist, Geist_Mono } from "next/font/google";
  2. import "./globals.css";
  3. import { ThemeProvider } from "@/components/ui/theme-provider";
  4. const geistSans = Geist({
  5. variable: "--font-geist-sans",
  6. subsets: ["latin"],
  7. });
  8. const geistMono = Geist_Mono({
  9. variable: "--font-geist-mono",
  10. subsets: ["latin"],
  11. });
  12. export const metadata = {
  13. title: "RHL Lieferscheine",
  14. description: "Internal delivery note browser",
  15. };
  16. export default function RootLayout({ children }) {
  17. return (
  18. <html lang="de" suppressHydrationWarning>
  19. <body
  20. className={`${geistSans.variable} ${geistMono.variable} min-h-screen bg-background text-foreground antialiased`}
  21. >
  22. <ThemeProvider
  23. /*
  24. Theme setup (shadcn/ui + next-themes):
  25. - attribute="class" means themes are controlled via <html class="dark">
  26. - defaultTheme="system" respects the OS preference
  27. - enableSystem keeps system sync
  28. - disableTransitionOnChange avoids flicker/jumpy transitions
  29. */
  30. attribute="class"
  31. defaultTheme="system"
  32. enableSystem
  33. disableTransitionOnChange
  34. >
  35. {children}
  36. </ThemeProvider>
  37. </body>
  38. </html>
  39. );
  40. }