Basic comments visualisation

This commit is contained in:
riggraz
2019-09-17 17:04:19 +02:00
parent 476f720119
commit 0c0c6d4e30
9 changed files with 114 additions and 12 deletions

View File

@@ -7,8 +7,9 @@ import IComment from '../interfaces/IComment';
const initialState: IComment = {
id: 0,
body: '',
userFullName: '',
updatedAt: '',
parentId: null,
userFullName: '<Unknown user>',
updatedAt: undefined,
};
const commentReducer = (
@@ -20,6 +21,7 @@ const commentReducer = (
return {
id: action.comment.id,
body: action.comment.body,
parentId: action.comment.parent_id,
userFullName: action.comment.user_full_name,
updatedAt: action.comment.updated_at,
};