import { redirect } from "next/navigation";
import { prisma } from "@capakraken/db";
import { SetupClient } from "./SetupClient.js";

export default async function SetupPage() {
  const count = await prisma.user.count();
  if (count > 0) {
    redirect("/auth/signin");
  }
  return <SetupClient />;
}
