"use client"; import { InvoiceView } from "~/components/data/invoice-view"; import InvoiceForm from "~/components/forms/invoice-form"; interface UnifiedInvoicePageProps { invoiceId: string; mode: string; } export function UnifiedInvoicePage({ invoiceId, mode, }: UnifiedInvoicePageProps) { return (
{/* Always render InvoiceForm to preserve state, but hide when in view mode */}
{/* Show InvoiceView only when in view mode */} {mode === "view" && }
); }