mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
Merge pull request #18 from chummer80/patch-1
Account for '0 items' in exercise for step1-06
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user