Skip to content

Commit

Permalink
[Hotfix] 메인 화면 좋아요 누르고 돌아오면 반영 안되는 문제
Browse files Browse the repository at this point in the history
  • Loading branch information
jpark0506 committed Aug 22, 2024
1 parent 691a5cb commit 15bce8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/components/search/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ const Search = (props: Props) => {

setIsFetching(false); // 요청 완료 후 isFetching 상태 변경
}
}, [query, page, stop, isAuthenticated,isLikeLoading]);
}, [query, page, stop, isAuthenticated]);

// 쿼리가 변경될 때 새로운 결과를 가져오기
useEffect(() => {
setResults([]);
setPage(0);
setStop(false);// 새 검색 시 정지 상태 해제
}, [query, isLoading]);
}, [query]);


// 페이지가 변경될 때 결과를 가져오기
Expand Down

0 comments on commit 15bce8b

Please sign in to comment.