251205:0000 Just start debug backend/frontend
This commit is contained in:
22
frontend/app/(dashboard)/correspondences/[id]/page.tsx
Normal file
22
frontend/app/(dashboard)/correspondences/[id]/page.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { correspondenceApi } from "@/lib/api/correspondences";
|
||||
import { CorrespondenceDetail } from "@/components/correspondences/detail";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
export default async function CorrespondenceDetailPage({
|
||||
params,
|
||||
}: {
|
||||
params: { id: string };
|
||||
}) {
|
||||
const id = parseInt(params.id);
|
||||
if (isNaN(id)) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
const correspondence = await correspondenceApi.getById(id);
|
||||
|
||||
if (!correspondence) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
return <CorrespondenceDetail data={correspondence} />;
|
||||
}
|
||||
Reference in New Issue
Block a user