Skip to content

Commit

Permalink
fix: async, await 이 없어서 api 순서 보장이 안되기 때문에 추가 (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakxe authored Aug 21, 2024
1 parent 124c97f commit 32ebc61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/hooks/usePutAndDeleteBillAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ const usePutAndDeleteBillAction = (
setErrorInfo(errorInfo ?? {title: false, price: false});
};

const onSubmit = (event: React.FormEvent<HTMLFormElement>, inputPair: InputPair, actionId: number) => {
const onSubmit = async (event: React.FormEvent<HTMLFormElement>, inputPair: InputPair, actionId: number) => {
event.preventDefault();

const {title, price} = inputPair;

putBillAction({actionId, title, price: Number(price)});
await putBillAction({actionId, title, price: Number(price)});

onClose();
};
Expand Down

0 comments on commit 32ebc61

Please sign in to comment.