"use client"; import { TrashIcon } from "@heroicons/react/24/outline"; import { PlainBill } from "../lib/db-types"; import { FC } from "react"; import { useFormState } from "react-dom"; import { updateBill } from "../lib/actions"; export interface BillEditFormProps { invoiceID: string, bill: PlainBill } export const BillEditForm:FC = ({ invoiceID, bill: { id, name, paid } }) => { const initialState = { message: null, errors: {} }; const updateBillWithId = updateBill.bind(null, invoiceID, id); const [ state, dispatch ] = useFormState(updateBillWithId, initialState); return(
{ // // // // 2023-22-12 document GSKG račun za 2023.pdf // }
); }