mirror of
https://github.com/vercel/next-learn.git
synced 2026-06-30 08:04:23 +00:00
* add database to project. Seed data. Update customerId to customer_id * seed customers table data * use database everywhere * refactor * fix ts lint errors * add type to invoice edit page * remove fetch-data file and fetch data directly in components * update lates invoices to use sql * in invoice table, search the database here with SQL * rename tsx files to ts and add node script to seed data * address rest of PR comments * move all data fetches to own file * add types to filter invoices function * remove unused param * prettier * update function names
12 lines
282 B
TypeScript
12 lines
282 B
TypeScript
'use server';
|
|
|
|
export async function deleteInvoice(id: number) {
|
|
// TO DO: Add delete invoice logic
|
|
console.log('Delete invoice', id);
|
|
}
|
|
|
|
export async function addOrUpdateInvoice(formData: FormData) {
|
|
// TO DO: Add create/update invoice logic
|
|
console.log('Edit Invoice');
|
|
}
|