<div className="tasklist">
<p>{props.task.task}</p>
<small>{new Date(props.task.createdAt.toString()).toDateString()}</small>
<br />
<i>Assigned By :</i>
<b>{props.task.assigned_by}</b>
<br />
<i>Assigned to :</i>
<b>{props.task.assigned_to}</b>
<br />
<i>status :</i>
<b>{props.task.status}</b>
<button onClick={showUpdateFormhandler}>
<img
onError={()=>{console.log('error occured')}}
src="edittask.png"
alt="update"
style={{ width: "20px", height: "20px" }}
/>
</button>
</div>
The same div is rendering image perfectly in listing tasks but when Iam using this div from users component it isn't loading. I have added css and image is in public folder. This is my first project in react. a task assigning app.