import { redirect } from "next/navigation";

import { LoginClient } from "@/features/auth/components/login-client";
import { getSessionUser } from "@/lib/auth-server";

export default async function LoginPage() {
  const user = await getSessionUser();

  if (user) {
    redirect("/dashboard");
  }

  return <LoginClient />;
}
