Add button to toggle comment is post update

This commit is contained in:
riccardo
2019-10-02 16:43:13 +02:00
parent e8d7fcc359
commit 2c2a0e0c82
12 changed files with 152 additions and 9 deletions

View File

@@ -5,6 +5,7 @@ import {
toggleCommentReply,
setCommentReplyBody,
} from '../actions/handleCommentReplies';
import { toggleCommentIsUpdate } from '../actions/updateComment';
import { submitComment } from '../actions/submitComment';
import { State } from '../reducers/rootReducer';
@@ -31,6 +32,15 @@ const mapDispatchToProps = (dispatch) => ({
dispatch(setCommentReplyBody(commentId, body));
},
toggleCommentIsPostUpdate(
postId: number,
commentId: number,
currentIsPostUpdate: boolean,
authenticityToken: string,
) {
dispatch(toggleCommentIsUpdate(postId, commentId, currentIsPostUpdate, authenticityToken));
},
submitComment(
postId: number,
body: string,