From bbf540dc11cc29d9982077a602c7c8455b184292 Mon Sep 17 00:00:00 2001 From: msk4862 Date: Sun, 1 Nov 2020 16:37:59 +0530 Subject: [PATCH] small fixes --- frontend/src/components/Posts/UserTile.js | 2 +- frontend/src/redux/reducers/dataReducer.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Posts/UserTile.js b/frontend/src/components/Posts/UserTile.js index 8462e4d..3c97bce 100644 --- a/frontend/src/components/Posts/UserTile.js +++ b/frontend/src/components/Posts/UserTile.js @@ -26,7 +26,7 @@ const UserTile = ({ userImage, userHandle, createdAt, body }) => { {dayjs(createdAt).fromNow()} {/* text */} - + {body && } diff --git a/frontend/src/redux/reducers/dataReducer.js b/frontend/src/redux/reducers/dataReducer.js index 1f64e81..fb099cd 100644 --- a/frontend/src/redux/reducers/dataReducer.js +++ b/frontend/src/redux/reducers/dataReducer.js @@ -72,11 +72,12 @@ export default (state = initialState, action) => { }; case ACTIONS.SUBMIT_COMMENT: + // console.log(action) return { ...state, post: { ...state.post, - comments: [action.payload, ...state.blog.comments], + comments: [action.payload, ...state.post.comments], }, };