import { GradesClient } from "@/modules/school/components/grades-view"
import { getGrades, getSchools, getStaffOptions } from "@/modules/school/data-access"

export const dynamic = "force-dynamic"

export default async function AdminGradesPage() {
  const [grades, schools, staff] = await Promise.all([getGrades(), getSchools(), getStaffOptions()])

  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">Grades</h2>
        <p className="text-muted-foreground">Manage grades and assign grade heads.</p>
      </div>
      <GradesClient grades={grades} schools={schools} staff={staff} />
    </div>
  )
}

