Last active
January 25, 2021 15:16
-
-
Save jogilvyt/49358fed0c2f41b4d59fb106b2d1d281 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ToDoItem from "../ToDoItem"; | |
const ToDoList = ({ todos, handleDelete }) => { | |
return ( | |
<ul className="list"> | |
{todos.length ? ( | |
todos.map(item => ( | |
<ToDoItem item={item} handleDelete={handleDelete} key={item.id} /> | |
)) | |
) : ( | |
<p>There is nothing left to do!</p> | |
)} | |
</ul> | |
); | |
}; | |
export default ToDoList; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment