Finalish MVP

This commit is contained in:
mdares
2026-01-05 16:36:00 +00:00
parent 538b06bd4b
commit ea92b32618
19 changed files with 2289 additions and 701 deletions

View File

@@ -1,5 +1,6 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import { cookies } from "next/headers";
import "./globals.css";
const geistSans = Geist({ variable: "--font-geist-sans", subsets: ["latin"] });
@@ -10,9 +11,15 @@ export const metadata: Metadata = {
description: "MaliounTech Industrial Suite",
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const cookieJar = await cookies();
const themeCookie = cookieJar.get("mis_theme")?.value;
const localeCookie = cookieJar.get("mis_locale")?.value;
const theme = themeCookie === "light" ? "light" : "dark";
const locale = localeCookie === "es-MX" ? "es-MX" : "en";
return (
<html lang="en">
<html lang={locale} data-theme={theme}>
<body className={`${geistSans.variable} ${geistMono.variable} antialiased`}>
{children}
</body>