Add request single page
This commit is contained in:
26
src/app/(admin)/commissions/requests/[id]/page.tsx
Normal file
26
src/app/(admin)/commissions/requests/[id]/page.tsx
Normal file
@ -0,0 +1,26 @@
|
||||
import { getCommissionRequestById } from "@/actions/commissions/requests/getCommissionRequestById";
|
||||
import { CommissionRequestEditor } from "@/components/commissions/requests/CommissionRequestEditor";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
export default async function CommissionRequestPage({
|
||||
params,
|
||||
}: {
|
||||
params: { id: string };
|
||||
}) {
|
||||
const { id } = await params;
|
||||
const request = await getCommissionRequestById(id);
|
||||
if (!request) notFound();
|
||||
|
||||
return (
|
||||
<div className="mx-auto w-full max-w-5xl space-y-6 p-4 md:p-8">
|
||||
<div className="space-y-1">
|
||||
<h1 className="text-2xl font-semibold tracking-tight">Commission Request</h1>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Submitted: {new Date(request.createdAt).toLocaleString()} · ID: {request.id}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<CommissionRequestEditor request={request as any} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user