// willDisplayCell
        collectionView.rx.willDisplayCell
            .filter { $0.at.section == 1 }
            .map {
                let currentItem = $0.at.item
                if (currentItem + 1) % 6 == 0 && currentItem != 0 {
                    return currentItem / 6 + 1
                }
                return nil
            }
            .compactMap { $0 }
            .map { Reactor.Action.willDisplayCell($0) }
            .bind(to: reactor.action)
            .disposed(by: disposeBag)
func setUpCommentSection(_ currentPage: Int = 0) -> Observable<Mutation> {
        let currentPage = currentPage
        let query: [String: Int] = ["page": currentPage]
        
        if currentState.loadedPage.contains(currentPage) { return .empty() }
        
        return CommunityAPI.fetchCommunityComment(currentState.communityId, query)
            .catch { _ in .empty() }
            .flatMap { data -> Observable<Mutation> in
                var commentItem = self.currentState.commentItem
                
                let newComments = data.comments.filter { newComment in
                    !commentItem.contains(where: { $0?.commentId == newComment.commentId })
                }
                commentItem.append(contentsOf: newComments)

                
                return .concat([
                    .just(.setCommentItem(commentItem)),
                    .just(.setCommentCount(data.commentCount)),
                    .just(.setLoadedPage(currentPage))
                ])
            }
    }

개선점