setView("new")}
openDraftId={openDraftId}
onDraftOpened={() => setOpenDraftId(null)}
/>
{
setDetailId(id);
setView("invoice");
}}
/>
{view === "invoice" && detailId !== null ? (
setView("invoices")}
onDuplicated={(draftId) => {
setOpenDraftId(draftId);
setView("new");
}}
/>
) : null}
{view === "settings" && }