import { Genre, Pub } from "@prisma/client";
import { getPubsWithGenres } from "app/lib/get";
import { columns } from "./columns";
import { DataTable } from "app/ui/tables/data-table";

export type PubsWithGenres = Pub & { genres: Array<Genre> }

export default async function Page() {
  const pubs = await getPubsWithGenres()
  return (
    <div className="container mx-auto">
      <DataTable data={pubs} columns={columns} />

    </div>
  )
}
