clean up story inspect page
This commit is contained in:
parent
9cebe4c2f6
commit
9ac1a7c288
|
@ -1,9 +1,7 @@
|
|||
// "use server"
|
||||
import prisma from "app/lib/db"
|
||||
import { columns } from "app/submission/columns"
|
||||
import { PageHeader, PageSubHeader } from "app/ui/pageHeader"
|
||||
import { DataTable } from "app/ui/tables/data-table"
|
||||
import { Badge } from "@/components/ui/badge"
|
||||
import GenreBadges from "app/ui/genreBadges"
|
||||
|
||||
//ids are string here because they're coming from url params
|
||||
|
@ -26,12 +24,12 @@ async function getStorySubmissions(id: string) {
|
|||
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const data = await getStoryWithGenres(params.id)
|
||||
const story = await getStoryWithGenres(params.id)
|
||||
const storySubs = await getStorySubmissions(params.id)
|
||||
return <>
|
||||
<div className="container">
|
||||
<PageHeader>{data?.title ?? ""}</PageHeader>
|
||||
<GenreBadges genres={data.genres} className="my-6" />
|
||||
<PageHeader>{story?.title ?? ""}</PageHeader>
|
||||
<GenreBadges genres={story.genres} className="my-6" />
|
||||
<PageSubHeader>Submissions:</PageSubHeader>
|
||||
<DataTable columns={columns} data={storySubs} type="submission" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue