New comments can be created

This commit is contained in:
riggraz
2019-09-18 13:40:00 +02:00
parent ecfdc54100
commit 7701c8f5e6
12 changed files with 267 additions and 18 deletions

View File

@@ -5,6 +5,7 @@ import {
toggleCommentReply,
setCommentReplyBody,
} from '../actions/handleCommentReplies';
import { submitComment } from '../actions/submitComment';
import { State } from '../reducers/rootReducer';
@@ -29,6 +30,15 @@ const mapDispatchToProps = (dispatch) => ({
setCommentReplyBody(commentId: number, body: string) {
dispatch(setCommentReplyBody(commentId, body));
},
submitComment(
postId: number,
body: string,
parentId: number,
authenticityToken: string,
) {
dispatch(submitComment(postId, body, parentId, authenticityToken));
},
});
export default connect(