import { DepartmentsClient } from "@/modules/school/components/departments-view"
import { getDepartments } from "@/modules/school/data-access"

export const dynamic = "force-dynamic"

export default async function AdminDepartmentsPage() {
  const departments = await getDepartments()
  return (
    <div className="flex h-full flex-col space-y-8 p-8">
      <div className="space-y-1">
        <h2 className="text-2xl font-bold tracking-tight">Departments</h2>
        <p className="text-muted-foreground">Manage school departments.</p>
      </div>
      <DepartmentsClient departments={departments} />
    </div>
  )
}
