Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion frontend/src/components/stockgame/Betting.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/utils/bettingHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down