import { redirect } from "next/navigation";
import { getCurrentUser, hasAnyAdmin } from "@/lib/auth";

export default async function Home() {
  const user = await getCurrentUser();
  if (user) redirect("/books");
  const anyAdmin = await hasAnyAdmin();
  redirect(anyAdmin ? "/signin" : "/signup");
}
