25 lines
544 B
JavaScript
Executable File
25 lines
544 B
JavaScript
Executable File
import { connect } from 'react-redux';
|
|
|
|
import CommentSearch from '../../components/CommentSearch';
|
|
import { fetchComment } from '../../data/actions/comment';
|
|
|
|
const mapStateToProps = state => (
|
|
{
|
|
commentDetails: state.comment.details,
|
|
errorFetching: state.comment.errorFetching,
|
|
}
|
|
);
|
|
|
|
const mapDispatchToProps = dispatch => (
|
|
{
|
|
getComment: commentId => dispatch(fetchComment(commentId)),
|
|
}
|
|
);
|
|
|
|
const CommentSearchPage = connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps,
|
|
)(CommentSearch);
|
|
|
|
export default CommentSearchPage;
|