Skip to content

Commit

Permalink
[Fix] 미체결 거래 체결전환 알림 관련 수정
Browse files Browse the repository at this point in the history
- 서버에서 빈배열 (체결 전환된 것이 없을 때 반환되는 response) 수신 시, 알림 메세지 띄우지 않도록 수정

Issues #122
  • Loading branch information
novice1993 committed Sep 19, 2023
1 parent 9e5e2df commit 5f0c5a5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions client/src/components/StockOrderSection/WaitOrderIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ const WaitOrderIndicator = () => {

useEffect(() => {
if (waitOrderSuccessData) {
toast.info(`대기주문이 체결되었습니다`, {
style: toastStyle,
position: "bottom-left",
});
console.log(waitOrderSuccessData);

if (waitOrderSuccessData[0].length !== 0 && waitOrderSuccessData[1].length !== 0) {
toast.info(`대기주문이 체결되었습니다`, {
style: toastStyle,
position: "bottom-left",
});
}
}
}, [waitOrderSuccessData]);

Expand Down

0 comments on commit 5f0c5a5

Please sign in to comment.