TIFNGK_E41222719/src/app/page.tsx

14 lines
381 B
TypeScript

import { redirect } from "next/navigation";
import { LoginForm } from "../components/auth/LoginForm";
import { getServerSession } from "next-auth";
import { authOptions } from "./api/auth/[...nextauth]/route";
export default async function Home() {
const session = await getServerSession(authOptions);
if (session) {
redirect("/dashboard");
}
return <LoginForm />;
}