Skip to content

Commit

Permalink
fix : 리뷰 요청 계속 되는 문제 해결1
Browse files Browse the repository at this point in the history
  • Loading branch information
kyumho kim committed Feb 15, 2024
1 parent a5a6f4d commit 9d27383
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/review/ReviewList.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ const ReviewList = ({ hotelId, onReviewEdit }) => {
}

useEffect(() => {
fetchReviews()
}, [hotelId, sortBy])
if (allReviews.length != 0) {
fetchReviews()
}
}, [])

const sortReviews = (reviews, sortBy) => {
if (sortBy === "recent") {
Expand Down

0 comments on commit 9d27383

Please sign in to comment.