import LoginClient from "@/components/admin/LoginClient";
import { getAuthCookie } from "@/lib/auth";
import { redirect } from "next/navigation";

export default async function LoginPage() {
  const admin = await getAuthCookie();
  
  if (admin) {
    redirect("/admin");
  }

  return <LoginClient />;
}
