import { eq } from "drizzle-orm"
import { getTeacherClasses } from "@/modules/classes/data-access"
import { MyClassesGrid } from "@/modules/classes/components/my-classes-grid"
import { auth } from "@/auth"
import { db } from "@/shared/db"
import { grades } from "@/shared/db/schema"

export const dynamic = "force-dynamic"

export default function MyClassesPage() {
  return <MyClassesPageImpl />
}

async function MyClassesPageImpl() {
  const classes = await getTeacherClasses()

  return (
    <div className="flex h-full flex-col space-y-4 p-8">
      <MyClassesGrid classes={classes} canCreateClass={false} />
    </div>
  )
}
