51 lines
1.2 KiB
TypeScript
51 lines
1.2 KiB
TypeScript
import type { Metadata } from "next";
|
|
import { Geist, Geist_Mono } from "next/font/google";
|
|
import { Suspense } from "react";
|
|
import { ConvexClientProvider } from "@/components/convex-client-provider";
|
|
import { getToken } from "@/lib/auth-server";
|
|
import "./globals.css";
|
|
|
|
const geistSans = Geist({
|
|
variable: "--font-geist-sans",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
const geistMono = Geist_Mono({
|
|
variable: "--font-geist-mono",
|
|
subsets: ["latin"],
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: "WebDev Pipeline",
|
|
description: "Interner Akquise-Agent fuer lokale Webdesign-Leads",
|
|
};
|
|
|
|
async function AuthenticatedConvexProvider({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const token = await getToken();
|
|
|
|
return <ConvexClientProvider initialToken={token}>{children}</ConvexClientProvider>;
|
|
}
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html
|
|
lang="de"
|
|
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
|
>
|
|
<body className="min-h-full flex flex-col">
|
|
<Suspense fallback={null}>
|
|
<AuthenticatedConvexProvider>{children}</AuthenticatedConvexProvider>
|
|
</Suspense>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|