Skip to content

Commit aa56dc0

Browse files
committed
수정
1 parent 65f161a commit aa56dc0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/domains/community/detail/DetailPage.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ function DetailPage() {
6262
setLike(false);
6363
}
6464
};
65-
fetchLikeStatus();
66-
}, [postId, isLoggedIn]);
65+
66+
// postId가 있을 때만 실행
67+
if (postId) {
68+
fetchLikeStatus();
69+
}
70+
}, [postId]); // isLoggedIn 의존성 제거하여 무한 루프 방지
6771

6872
useEffect(() => {
6973
if (postDetail) {

0 commit comments

Comments
 (0)