feat(inventory): update form submission to use async function in InventoryConsumeForm and InventoryEditForm
This commit is contained in:
@@ -36,7 +36,7 @@ export default function InventoryConsumeForm({ id, unit }: Props) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<form
|
<form
|
||||||
onSubmit={(e) => {
|
onSubmit={async (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setError(null);
|
setError(null);
|
||||||
const form = e.currentTarget;
|
const form = e.currentTarget;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default function InventoryEditForm({ item }: Props) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<form
|
<form
|
||||||
onSubmit={(e) => {
|
onSubmit={async (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
setError(null);
|
setError(null);
|
||||||
const form = e.currentTarget;
|
const form = e.currentTarget;
|
||||||
|
|||||||
Reference in New Issue
Block a user