Skip to content

Commit

Permalink
update redux connect in client-admin moderate-comments
Browse files Browse the repository at this point in the history
(cherry picked from commit 7379fe7)
  • Loading branch information
thomassth committed Nov 24, 2024
1 parent 7abea2a commit 1b30ada
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,4 @@ ModerateCommentsAccepted.propTypes = {
accepted_comments: PropTypes.arrayOf(PropTypes.object)
}

const mapStateToProps = (state) => ({
dispatch: state.mod_comments_accepted.dispatch,
accepted_comments: state.mod_comments_accepted.accepted_comments,
});
export default connect(mapStateToProps)(ModerateCommentsAccepted)
export default connect((state) => state.mod_comments_accepted)(ModerateCommentsAccepted)
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,5 @@ ModerateCommentsRejected.propTypes = {
dispatch: PropTypes.func,
rejected_comments: PropTypes.arrayOf(PropTypes.object)
}
const mapStateToProps = (state) => ({
dispatch: state.mod_comments_rejected.dispatch,
rejected_comments: state.mod_comments_rejected.rejected_comments,
});
export default connect(mapStateToProps)(ModerateCommentsRejected)

export default connect((state) => state.mod_comments_rejected)(ModerateCommentsRejected)
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,4 @@ ModerateCommentsTodo.propTypes = {
unmoderated_comments: PropTypes.arrayOf(PropTypes.object)
}

const mapStateToProps = (state) => ({
dispatch: state.mod_comments_unmoderated.dispatch,
unmoderated_comments: state.mod_comments_unmoderated.unmoderated_comments,
});

export default connect(mapStateToProps)(ModerateCommentsTodo)
export default connect((state) => state.mod_comments_unmoderated)(ModerateCommentsTodo)

0 comments on commit 1b30ada

Please sign in to comment.