Created
May 6, 2020 15:13
-
-
Save siljanoskam/0f0007dec806884ab0b8b91c6e0ad472 to your computer and use it in GitHub Desktop.
Task component
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 React, {Component} from 'react'; | |
const Task = ({task}) => { | |
if (!task) { | |
return ( | |
<div className="single-task-wrapper"> | |
<h4>No task selected.</h4> | |
</div> | |
) | |
} | |
return ( | |
<div className="single-task-wrapper"> | |
<h3> {task.title} </h3> | |
<p> {task.description} </p> | |
<h4> Status: </h4> | |
<p>{task.status ? 'Done' : 'Undone'}</p> | |
</div> | |
) | |
}; | |
export default Task; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment