added neon auth

This commit is contained in:
2026-05-16 17:32:23 +02:00
parent d9fd8a46de
commit 02e10a8b8a
12 changed files with 4698 additions and 106 deletions
+34 -2
View File
@@ -1,6 +1,9 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import Link from "next/link";
import { NeonAuthUIProvider, UserButton } from "@neondatabase/auth/react";
import { authClient } from "@/lib/auth/client";
const geistSans = Geist({
variable: "--font-geist-sans",
@@ -13,7 +16,7 @@ const geistMono = Geist_Mono({
});
export const metadata: Metadata = {
title: "Create Next App",
title: "Event Manager",
description: "Generated by create next app",
};
@@ -26,8 +29,37 @@ export default function RootLayout({
<html
lang="en"
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
suppressHydrationWarning
>
<body className="min-h-full flex flex-col">{children}</body>
<body className="min-h-full flex flex-col bg-background text-foreground">
<NeonAuthUIProvider
authClient={authClient as any}
emailOTP
credentials={{ forgotPassword: true }}
social={{ providers: ["google", "github"] }}
>
<header className="border-b border-(--border) bg-surface/90 backdrop-blur">
<div className="mx-auto flex h-16 w-full max-w-6xl items-center justify-between px-4">
<Link href={"/"} className="text-sm font-semibold tracking-wide">
Event Manager
</Link>
<nav className="flex items-center gap-4">
<Link
href={"/dashboard"}
className="text-sm text-(--muted-foreground)"
>
Dashboard
</Link>
<UserButton size="icon" />
</nav>
</div>
</header>
<main className="mx-auto flex w-full max-w-6xl flex-1 flex-col px-4 py-8">
{children}
</main>
</NeonAuthUIProvider>
</body>
</html>
);
}