"use client"; import { CorrespondenceDetail } from "@/components/correspondences/detail"; import { useCorrespondence } from "@/hooks/use-correspondence"; import { Loader2 } from "lucide-react"; import { notFound, useParams } from "next/navigation"; export default function CorrespondenceDetailPage() { const params = useParams(); const id = Number(params?.id); // useParams returns string | string[] if (isNaN(id)) { // We can't use notFound() directly in client component render without breaking sometimes, // but typically it works. Better to handle gracefully or redirect. // For now, let's keep it or return 404 UI. // Actually notFound() is for server components mostly. // Let's just return our error UI if ID is invalid. return (
Please try again later or verify the ID.