10 lines
368 B
TypeScript
10 lines
368 B
TypeScript
import { getServerSession } from "next-auth";
|
|
import { redirect } from "next/navigation";
|
|
import { authOptions } from "@/lib/auth";
|
|
import { AppShell } from "@/components/layout/AppShell";
|
|
|
|
export default async function HomePage() {
|
|
const session = await getServerSession(authOptions);
|
|
if (!session) redirect("/login");
|
|
return <AppShell user={session.user} />;
|
|
} |