Created
February 20, 2023 20:45
-
-
Save nataliaconde/42d4dcca7a232084f00c621a738d2a26 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
// components/Task.js | |
export default function Task(props) { | |
// ... | |
<CardActions> | |
{props.isDone ? ( | |
<Button size="small" onClick={() => props.markTaskAsUndone(props.id)}>Mark as undone</Button> | |
) : ( | |
<Button size="small" onClick={() => props.markTaskAsDone(props.id)}>Mark as done</Button> | |
)} | |
<Button size="small" onClick={() => props.deleteTask(props.id)}>Delete</Button> | |
</CardActions> | |
// ... | |
} | |
// Your final file should look like this: | |
// https://github.com/duplxey/back4app-containers-nextjs/blob/master/components/Task.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment