Add CRUD for other entities
This commit is contained in:
parent
f87bcc43a5
commit
a3e8b89128
64 changed files with 949 additions and 62 deletions
|
|
@ -0,0 +1,24 @@
|
|||
import { db } from "@/app/_lib/database";
|
||||
import { Edit } from "./_components/Edit";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
type Props = {
|
||||
params: { segment: string[] };
|
||||
};
|
||||
|
||||
export default async function Page({ params: { segment } }: Props) {
|
||||
const id = segment?.[0];
|
||||
|
||||
if (!id) return null;
|
||||
|
||||
const row = await db
|
||||
.selectFrom("VoiceLine")
|
||||
.selectAll()
|
||||
.where("id", "=", id)
|
||||
.executeTakeFirst();
|
||||
|
||||
if (!row) return null;
|
||||
|
||||
return <Edit row={row} />;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue