diff --git a/app/(root)/layout.tsx b/app/(root)/layout.tsx
index ff31718..76a8669 100644
--- a/app/(root)/layout.tsx
+++ b/app/(root)/layout.tsx
@@ -5,20 +5,25 @@ import Nav from "@/components/Navbar/Nav";
import Footer from "@/components/Home/Footer/Footer";
import {ThemeProvider} from "@/components/provider/ThemeProvider";
import React from "react";
+import {cookies} from "next/headers";
export const metadata: Metadata = {
title: "Rhein Software",
description: "Rhein Software Development",
};
-export default function RootLayout({
- children,
- }: Readonly<{
+export default async function RootLayout({
+ children,
+ }: Readonly<{
children: React.ReactNode;
}>) {
+ const cookieStore = await cookies();
+ const theme = cookieStore.get("theme")?.value === "dark" ? "dark" : "light";
+
return (
-
-
+
+
{children}
diff --git a/app/contact/layout.tsx b/app/contact/layout.tsx
index 91fdeaf..b274b97 100644
--- a/app/contact/layout.tsx
+++ b/app/contact/layout.tsx
@@ -1,24 +1,29 @@
import type {Metadata} from "next";
-import '../(root)/globals.css';
+import "../(root)/globals.css";
import Nav from "@/components/Navbar/Nav";
import Footer from "@/components/Home/Footer/Footer";
import {ThemeProvider} from "@/components/provider/ThemeProvider";
import React from "react";
+import {cookies} from "next/headers";
export const metadata: Metadata = {
title: "Rhein Software",
description: "Rhein Software Development",
};
-export default function RootLayout({
- children,
- }: Readonly<{
+export default async function RootLayout({
+ children,
+ }: Readonly<{
children: React.ReactNode;
}>) {
+ const cookieStore = await cookies();
+ const theme = cookieStore.get("theme")?.value === "dark" ? "dark" : "light";
+
return (
-
-
+
+
+
{children}
diff --git a/app/legal/layout.tsx b/app/legal/layout.tsx
index 9e338d8..b274b97 100644
--- a/app/legal/layout.tsx
+++ b/app/legal/layout.tsx
@@ -1,29 +1,34 @@
import type {Metadata} from "next";
-import '../(root)/globals.css';
+import "../(root)/globals.css";
import Nav from "@/components/Navbar/Nav";
import Footer from "@/components/Home/Footer/Footer";
import {ThemeProvider} from "@/components/provider/ThemeProvider";
import React from "react";
+import {cookies} from "next/headers";
export const metadata: Metadata = {
title: "Rhein Software",
description: "Rhein Software Development",
};
-export default function RootLayout({
- children,
- }: Readonly<{
+export default async function RootLayout({
+ children,
+ }: Readonly<{
children: React.ReactNode;
}>) {
+ const cookieStore = await cookies();
+ const theme = cookieStore.get("theme")?.value === "dark" ? "dark" : "light";
+
return (
-
-
-
-
- {children}
-
-
+
+
+
+
+
+ {children}
+
+
);