diff --git a/app/ui/invoices/create-form.tsx b/app/ui/invoices/create-form.tsx index 6492feb..548e7ec 100644 --- a/app/ui/invoices/create-form.tsx +++ b/app/ui/invoices/create-form.tsx @@ -16,7 +16,7 @@ export default function Form({ customers }: { customers: CustomerField[] }) { const [state, dispatch] = useFormState(createInvoice, initialState); console.log(state); return ( -
+
{/* Customer Name */}
@@ -70,6 +70,13 @@ export default function Form({ customers }: { customers: CustomerField[] }) { />
+
+ {state.errors?.amount && state.errors.amount.map(s => ( +

{s}

+ ) + ) + } +
@@ -82,42 +89,54 @@ export default function Form({ customers }: { customers: CustomerField[] }) {
+
+ {state.errors?.status && state.errors?.status.map(e => ( +

{e}

+ ))} +
+ +
+ { + state.message && (

{state.message}

) + } +
Cancel