﻿import type { Metadata } from "next"
import type { JSX } from "react"

import { SchoolsClient } from "@/modules/school/components/schools-view"
import { getSchools } from "@/modules/school/data-access"

export const metadata: Metadata = {
  title: "学校管理 - Next_Edu",
  description: "多校区场景下的学校管理",
}

export const dynamic = "force-dynamic"

export default async function AdminSchoolsPage(): Promise<JSX.Element> {
  const schools = await getSchools()
  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">学校管理</h2>
        <p className="text-muted-foreground">多校区场景下的学校管理。</p>
      </div>
      <SchoolsClient schools={schools} />
    </div>
  )
}
