import { redirect } from "next/navigation";

import { AuthEntry } from "@/components/auth-entry";
import { isAuthenticated } from "@/lib/auth-server";

export default async function Home() {
  const isSessionActive = await isAuthenticated();

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

  return <AuthEntry />;
}
