first commit
This commit is contained in:
commit
b7b0f253ce
85 files changed
+7560
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import type { Metadata } from "next";
|
||||
import { cookies } from "next/headers";
|
||||
import "@fontsource-variable/inter";
|
||||
import "@tabler/core/dist/css/tabler.min.css";
|
||||
import "./globals.css";
|
||||
import { I18nProvider } from "@/i18n/client";
|
||||
import { dictionaries } from "@/i18n/core";
|
||||
import { getLocale } from "@/i18n/server";
|
||||
import { TablerJs } from "@/components/tabler-js";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: { default: "Bokplanerare", template: "%s · Bokplanerare" },
|
||||
description: "Planeringsverktyg för författare",
|
||||
};
|
||||
|
||||
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
const locale = await getLocale();
|
||||
const theme = (await cookies()).get("theme")?.value === "dark" ? "dark" : "light";
|
||||
|
||||
return (
|
||||
<html lang={locale} data-bs-theme={theme}>
|
||||
<body>
|
||||
<I18nProvider locale={locale} dict={dictionaries[locale]}>
|
||||
<TablerJs />
|
||||
{children}
|
||||
</I18nProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user