Merge pull request #18 from chummer80/patch-1

Account for '0 items' in exercise for step1-06
This commit is contained in:
David Zearing
2019-02-26 21:49:35 -08:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
### TodoFooter
1. Use the provided `itemCount` value drive the number of items left.
2. Use a ternary operator to print `item` vs `items` based on if `itemCount > 1`
2. Use a ternary operator to print `item` vs `items` based on if `itemCount === 1`
### TodoListItem

View File

@@ -5,7 +5,7 @@ export const TodoFooter = (props: any) => {
return (
<footer>
<span>
{itemCount} item{itemCount > 1 ? 's' : ''} left
{itemCount} item{itemCount === 1 ? '' : 's'} left
</span>
<button className="submit">Clear Completed</button>
</footer>