Add Better Auth admin authentication
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Geist, Geist_Mono } from "next/font/google";
|
||||
import { ConvexClientProvider } from "@/components/convex-client-provider";
|
||||
import { getToken } from "@/lib/auth-server";
|
||||
import "./globals.css";
|
||||
|
||||
const geistSans = Geist({
|
||||
@@ -18,18 +19,20 @@ export const metadata: Metadata = {
|
||||
description: "Interner Akquise-Agent fuer lokale Webdesign-Leads",
|
||||
};
|
||||
|
||||
export default function RootLayout({
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
}: Readonly<{
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
const token = await getToken();
|
||||
|
||||
return (
|
||||
<html
|
||||
lang="de"
|
||||
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
||||
>
|
||||
<body className="min-h-full flex flex-col">
|
||||
<ConvexClientProvider>{children}</ConvexClientProvider>
|
||||
<ConvexClientProvider initialToken={token}>{children}</ConvexClientProvider>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user