import { getSubsComplete } from "app/lib/get"
import { DataTable } from "app/ui/tables/data-table"
import { columns } from "./columns"
import { Pub, Response, Story, Sub } from "@prisma/client"

export type SubComplete = Sub & {
  pub: Pub,
  story: Story,
  response: Response
}
export default async function Page() {
  const subs: Array<SubComplete> = await getSubsComplete()
  return (
    <div className="container mx-auto py-10">
      <DataTable data={subs} columns={columns} />
    </div>
  )
}
