Skip to content

Commit

Permalink
Merge pull request #1126 from Ayushmaanagarwal1211/Delete-blog
Browse files Browse the repository at this point in the history
Fixed Delete icon showing to all
  • Loading branch information
thestarsahil committed Jul 18, 2024
2 parents 8e1611f + 9c081f8 commit 943f682
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/blogs/BlogReadPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,14 @@ const BlogReadPage = () => {
<div className="flex gap-6" style={{display:"flex"}}>

{blog.createdBy === userId && (
<div className="Edit_icon">
<> <div className="Edit_icon">
<MdModeEdit size={18} onClick={handleEditClick} />
</div>
<div className="flex justify-end" style={{display:'flex',justifyContent:"end"}}>{<FaTrash size={'2rem'} onClick={()=>handleDelete(blog.id)}/>}</div>
</>
)}
<div className="flex justify-end" style={{display:'flex',justifyContent:"end"}}>{<FaTrash size={'2rem'} onClick={()=>handleDelete(blog.id)}/>}</div> </div>
</div>

</div>
</div>
<div className="blog-content" dangerouslySetInnerHTML={createMarkup(blog.content)}></div>
Expand Down

0 comments on commit 943f682

Please sign in to comment.