+
+ Not Found
+ Could not find the requested invoice.
+
+
+ );
+}
diff --git a/dashboard/15-final/app/dashboard/invoices/[id]/edit/page.tsx b/dashboard/15-final/app/dashboard/invoices/[id]/edit/page.tsx
index b3d5cc7..00beb03 100644
--- a/dashboard/15-final/app/dashboard/invoices/[id]/edit/page.tsx
+++ b/dashboard/15-final/app/dashboard/invoices/[id]/edit/page.tsx
@@ -1,6 +1,6 @@
-import { notFound } from 'next/navigation';
import { fetchInvoiceById, fetchAllCustomers } from '@/app/lib/data';
import { updateInvoice } from '@/app/lib/actions';
+import { notFound } from 'next/navigation';
export default async function Page({ params }: { params: { id: string } }) {
const id = params.id;
diff --git a/dashboard/15-final/app/dashboard/invoices/error.tsx b/dashboard/15-final/app/dashboard/invoices/error.tsx
new file mode 100644
index 0000000..d01f433
--- /dev/null
+++ b/dashboard/15-final/app/dashboard/invoices/error.tsx
@@ -0,0 +1,31 @@
+'use client';
+
+import { useEffect } from 'react';
+
+export default function Error({
+ error,
+ reset,
+}: {
+ error: Error & { digest?: string };
+ reset: () => void;
+}) {
+ useEffect(() => {
+ // Optionally log the error to an error reporting service
+ console.error(error);
+ }, [error]);
+
+ return (
+