File size: 314 Bytes
f5071ca
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import * as ApiUtil from '../util/comment_api_util';

export const RECEIVE_COMMENT = 'RECEIVE_COMMENT';

const receiveComment = comment => ({
  type: RECEIVE_COMMENT,
  comment
});

export const createComment = comment => dispatch => (
  ApiUtil.createComment(comment).then(res => dispatch(receiveComment(res)))
);