diff --git a/frontend/src/components/stockgame/Betting.jsx b/frontend/src/components/stockgame/Betting.jsx index 7b535d3d..2cd051dd 100644 --- a/frontend/src/components/stockgame/Betting.jsx +++ b/frontend/src/components/stockgame/Betting.jsx @@ -38,7 +38,10 @@ const Betting = ({ period }) => { return; } - if (data.betRoundId === userBets.betRoundId) { + if ( + data.betRoundId === userBets.betRoundId && + userBets.betStatus !== 'DELETED' + ) { userBets.option === 'RISE' ? setIsBetting('up') : setIsBetting('down'); } else { setIsBetting('none'); diff --git a/frontend/src/utils/bettingHistory.js b/frontend/src/utils/bettingHistory.js index 94f7bb11..38bd8f23 100644 --- a/frontend/src/utils/bettingHistory.js +++ b/frontend/src/utils/bettingHistory.js @@ -4,7 +4,8 @@ const betHistory = async () => { try { const res = await api.get('/api/user-bets/history'); // 백엔드에서 최신순으로 정렬된 데이터 반환 - return res.data; + const filterdRes = res.data.filter((r) => r.betStatus !== 'DELETED'); + return filterdRes; } catch (error) { console.log(error.message); return null;