Skip to content

Commit

Permalink
Merge pull request fullminji#76 from fullminji/FRONT-40
Browse files Browse the repository at this point in the history
fix: 게임 종료시 타이머 정지 추가
  • Loading branch information
Haze10425 authored Feb 20, 2024
2 parents 38b8baf + 683caee commit 527a61d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/Room/Room.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ const Room: React.FC = () => {

// 타이머 실행
useEffect(() => {
if (isPencil) {
if (isPencil && !gameEnd) {
countDown();
} else {
clearInterval(interval.current); // isPencil이 false인 경우 타이머 중지
console.log('타이머실행멈춤');
}
}, [isPencil]);
}, [isPencil, gameEnd]);

// 정답시 타이머 정지
useEffect(() => {
Expand Down

0 comments on commit 527a61d

Please sign in to comment.