- {state.errors.amount.map((error: string) => (
-
+
+
+
+
+
+
- ) : null}
-
-
- {/* Invoice Status */}
-
-
-
-
- {state.errors?.status ? (
-
- {state.errors.status.map((error: string) => (
-
{error}
- ))}
-
- ) : null}
-
- {state.message ? (
-
-
{state.message}
+ {state.errors?.status ? (
+
+ {state.errors.status.map((error: string) => (
+
{error}
+ ))}
) : null}
-
-
- Cancel
-
-
-
-
-
+
+ {state.message ? (
+
+ ) : null}
+
+
+
+ Cancel
+
+
+
+
);
}
diff --git a/dashboard/15-final/app/ui/invoices/edit-form.tsx b/dashboard/15-final/app/ui/invoices/edit-form.tsx
index 2776335c..6f28c9ba 100644
--- a/dashboard/15-final/app/ui/invoices/edit-form.tsx
+++ b/dashboard/15-final/app/ui/invoices/edit-form.tsx
@@ -1,12 +1,7 @@
'use client';
import { CustomerName, InvoiceForm } from '@/app/lib/definitions';
-import { updateInvoice } from '@/app/lib/actions';
-// @ts-ignore React types do not yet include useFormState
-import { experimental_useFormState as useFormState } from 'react-dom';
import Link from 'next/link';
-import { lusitana } from '@/app/ui/fonts';
-import { clsx } from 'clsx';
import {
CheckIcon,
ClockIcon,
@@ -14,7 +9,9 @@ import {
UserCircleIcon,
} from '@heroicons/react/24/outline';
import { Button } from '../button';
-import { Breadcrumbs } from './breadcrumbs';
+import { updateInvoice } from '@/app/lib/actions';
+// @ts-ignore React types do not yet include useFormState
+import { experimental_useFormState as useFormState } from 'react-dom';
export default function EditInvoiceForm({
id,
@@ -29,166 +26,151 @@ export default function EditInvoiceForm({
const [state, dispatch] = useFormState(updateInvoice, initialState);
return (
-