Fix edit invoice initialization and routing
The form initialization logic for editing invoices was improved to handle route changes correctly. The edit link path was fixed and cache invalidation was added to ensure fresh data on navigation.
This commit is contained in:
@@ -131,7 +131,7 @@ function InvoiceViewContent({ invoiceId }: { invoiceId: string }) {
|
||||
>
|
||||
<PDFDownloadButton invoiceId={invoice.id} variant="outline" />
|
||||
<Button asChild variant="default">
|
||||
<Link href={`/dashboard/invoices/${invoice.id}`}>
|
||||
<Link href={`/dashboard/invoices/${invoice.id}/edit`}>
|
||||
<Edit className="h-5 w-5" />
|
||||
<span>Edit</span>
|
||||
</Link>
|
||||
|
||||
Reference in New Issue
Block a user