From bf026d56ffa6ef0406e0efbe31c873621e449563 Mon Sep 17 00:00:00 2001 From: pakxe Date: Wed, 21 Aug 2024 21:09:18 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20async,=20await=20=EC=9D=B4=20=EC=97=86?= =?UTF-8?q?=EC=96=B4=EC=84=9C=20api=20=EC=88=9C=EC=84=9C=20=EB=B3=B4?= =?UTF-8?q?=EC=9E=A5=EC=9D=B4=20=EC=95=88=EB=90=98=EA=B8=B0=20=EB=95=8C?= =?UTF-8?q?=EB=AC=B8=EC=97=90=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/hooks/usePutAndDeleteBillAction.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/hooks/usePutAndDeleteBillAction.ts b/client/src/hooks/usePutAndDeleteBillAction.ts index 2bd7366ed..6f1e4feaf 100644 --- a/client/src/hooks/usePutAndDeleteBillAction.ts +++ b/client/src/hooks/usePutAndDeleteBillAction.ts @@ -83,12 +83,12 @@ const usePutAndDeleteBillAction = ( setErrorInfo(errorInfo ?? {title: false, price: false}); }; - const onSubmit = (event: React.FormEvent, inputPair: InputPair, actionId: number) => { + const onSubmit = async (event: React.FormEvent, inputPair: InputPair, actionId: number) => { event.preventDefault(); const {title, price} = inputPair; - putBillAction({actionId, title, price: Number(price)}); + await putBillAction({actionId, title, price: Number(price)}); onClose(); };