Files
vereinskalender/app/page.tsx
2026-01-15 16:24:09 +01:00

24 lines
685 B
TypeScript

import { getServerSession } from "next-auth";
import { redirect } from "next/navigation";
import CalendarBoard from "../components/CalendarBoard";
import { authOptions } from "../lib/auth";
export default async function HomePage() {
const session = await getServerSession(authOptions);
return (
<div className="space-y-8">
{session?.user?.status === "ACTIVE" ? (
<CalendarBoard />
) : session?.user ? (
<div className="card-muted text-center">
<p className="text-slate-700">
Dein Konto wartet auf Freischaltung durch einen Admin.
</p>
</div>
) : (
redirect("/login")
)}
</div>
);
}