Skip to content

Commit

Permalink
#23 Pass props to showEditForm in comment.js
Browse files Browse the repository at this point in the history
  • Loading branch information
SandraBergstrom committed Jun 28, 2023
1 parent 56cb63c commit 3d9cb5b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/pages/comments/Comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,18 @@ const Comment = (props) => {
<span className={styles.Owner}>{owner}</span>
<span className={styles.Date}>{updated_at}</span>
</div>
{showEditForm ? <CommentEditForm /> : <p>{content}</p>}
{showEditForm ? (
<CommentEditForm
id={id}
traveler_id={traveler_id}
content={content}
traveler_image={traveler_image}
setComments={setComments}
setShowEditForm={setShowEditForm}
/>
) : (
<p>{content}</p>
)}
</Media.Body>
{is_owner && !showEditForm && (
<MoreDropdown
Expand Down

0 comments on commit 3d9cb5b

Please sign in to comment.