From 5b571a8f278db2ca6385d374a95d2321c48fcd76 Mon Sep 17 00:00:00 2001 From: Andrean <88448470+QkoSad@users.noreply.github.com> Date: Mon, 8 May 2023 17:03:44 +0000 Subject: [PATCH] Update PostItem.js --- client/src/components/posts/PostItem.js | 63 +------------------------ 1 file changed, 1 insertion(+), 62 deletions(-) diff --git a/client/src/components/posts/PostItem.js b/client/src/components/posts/PostItem.js index f1cfdc5..71e5f60 100644 --- a/client/src/components/posts/PostItem.js +++ b/client/src/components/posts/PostItem.js @@ -1,8 +1,4 @@ -<<<<<<< HEAD -import React from 'react'; -======= import React, { Fragment } from 'react'; ->>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import formatDate from '../../utils/formatDate'; @@ -14,12 +10,7 @@ const PostItem = ({ removeLike, deletePost, auth, -<<<<<<< HEAD post: { _id, text, name, avatar, user, likes, comments, date } -======= - post: { _id, text, name, avatar, user, likes, comments, date }, - showActions ->>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb }) => (
@@ -31,8 +22,6 @@ const PostItem = ({

{text}

Posted on {formatDate(date)}

- -<<<<<<< HEAD -======= - {showActions && ( - - - - - Discussion{' '} - {comments.length > 0 && ( - {comments.length} - )} - - {!auth.loading && user === auth.user._id && ( - - )} - ->>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb )}
); -<<<<<<< HEAD -======= -PostItem.defaultProps = { - showActions: true -}; - ->>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb PostItem.propTypes = { post: PropTypes.object.isRequired, auth: PropTypes.object.isRequired, addLike: PropTypes.func.isRequired, removeLike: PropTypes.func.isRequired, -<<<<<<< HEAD deletePost: PropTypes.func.isRequired -======= - deletePost: PropTypes.func.isRequired, - showActions: PropTypes.bool ->>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb }; const mapStateToProps = (state) => ({ @@ -128,8 +70,5 @@ const mapStateToProps = (state) => ({ export default connect(mapStateToProps, { addLike, removeLike, deletePost })( PostItem -<<<<<<< HEAD ); -======= -); ->>>>>>> cc38df43629d64ca77f694c971a13a026b3afcfb +