"use client"; import { RFADetail } from "@/components/rfas/detail"; import { notFound, useParams } from "next/navigation"; import { useRFA } from "@/hooks/use-rfa"; import { Loader2 } from "lucide-react"; export default function RFADetailPage() { const { id } = useParams(); if (!id) notFound(); const { data: rfa, isLoading, isError } = useRFA(String(id)); if (isLoading) { return (
); } if (isError || !rfa) { // Check if error is 404 return (
RFA not found or failed to load.
); } return ; }