Skip to content

Instantly share code, notes, and snippets.

@siljanoskam
Created May 6, 2020 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siljanoskam/0f0007dec806884ab0b8b91c6e0ad472 to your computer and use it in GitHub Desktop.
Save siljanoskam/0f0007dec806884ab0b8b91c6e0ad472 to your computer and use it in GitHub Desktop.
Task component
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