18 lines
422 B
TypeScript
18 lines
422 B
TypeScript
import { redirect } from "next/navigation";
|
|
import LoginForm from "@/components/admin/login-form";
|
|
import { auth } from "@/lib/auth";
|
|
|
|
export default async function AdminLoginPage() {
|
|
const session = await auth();
|
|
|
|
if (session?.user) {
|
|
redirect("/admin");
|
|
}
|
|
|
|
return (
|
|
<main className="flex min-h-screen items-center justify-center bg-background p-6 text-foreground">
|
|
<LoginForm />
|
|
</main>
|
|
);
|
|
}
|