import { redirect } from "next/navigation";
import { getCurrentUser } from "@/lib/auth-middleware";

export default async function HomePage() {
  const user = await getCurrentUser();
  if (user) {
    redirect("/projects");
  }
  redirect("/login");
}
