Remove routes and actions

This commit is contained in:
Delba de Oliveira
2023-10-26 09:10:36 -07:00
parent 37d340fa88
commit 7b14093d2a
13 changed files with 1 additions and 345 deletions

View File

@@ -10,15 +10,10 @@ import {
} from '@heroicons/react/24/outline';
import { Button } from '../button';
import { createInvoice } from '@/app/lib/actions';
// @ts-ignore React types do not yet include useFormState
import { experimental_useFormState as useFormState } from 'react-dom';
export default function Form({ customers }: { customers: CustomerField[] }) {
const initialState = { message: null, errors: [] };
const [state, dispatch] = useFormState(createInvoice, initialState);
return (
<form action={dispatch}>
<form>
<div className="rounded-md bg-gray-50 p-4 md:p-6">
{/* Customer Name */}
<div className="mb-4">

View File

@@ -31,7 +31,6 @@ export default async function InvoicesTable({
className="mr-2 rounded-full"
width={28}
height={28}
alt={`${invoice.name}'s profile picture`}
/>
<p>{invoice.name}</p>
</div>
@@ -90,7 +89,6 @@ export default async function InvoicesTable({
className="rounded-full"
width={28}
height={28}
alt={`${invoice.name}'s profile picture`}
/>
<p>{invoice.name}</p>
</div>