refactoring: fixing typescript

This commit is contained in:
2024-01-09 16:41:59 +01:00
parent 53a266df44
commit 102edff52f
10 changed files with 23 additions and 23 deletions

View File

@@ -110,12 +110,10 @@ const serializeAttachment = async (billAttachment: File | null) => {
* @param formData form data
* @returns
*/
export const updateOrAddBill = withUser(async (user:AuthenticatedUser, locationId: string, billId?:string, prevState:State, formData: FormData) => {
export const updateOrAddBill = withUser(async (user:AuthenticatedUser, locationId: string, billId:string|undefined, prevState:State, formData: FormData) => {
const { id: userId } = user;
const x = formData.get('payedAmount');
const validatedFields = UpdateBill.safeParse({
billName: formData.get('billName'),
billNotes: formData.get('billNotes'),