import { redirect } from "next/navigation"
import { getServerSession } from "@/lib/auth-server"
import { isStaff } from "@/lib/authz"

export default async function Home() {
  const session = await getServerSession()
  if (!session?.user) {
    redirect("/login")
  }
  if (isStaff(session.user.role)) {
    redirect("/dashboard")
  }
  redirect("/portal")
}
