Skip to content

Commit

Permalink
feat(ui): implement list controls visibility when no Todos
Browse files Browse the repository at this point in the history
  • Loading branch information
bsbodden committed Feb 23, 2021
1 parent e06df16 commit 49e9003
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/webapp/src/components/todo_list_controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const TodoListControls = function (props) {
]);

return (
<footer className="footer">
<>{todos.length > 0 && <footer className="footer">
{/* This should be `0 items left` by default */}
<span className="todo-count"><strong>{itemsLeft}</strong> {itemsLeft != 1 ? "items" : "item"} left</span>
{/* Remove this if you don't implement routing */}
Expand All @@ -32,7 +32,7 @@ const TodoListControls = function (props) {
{itemsCompleted > 0 &&
<button className="clear-completed" onClick={clearCompleted}>Clear completed</button>
}
</footer>
</footer>}</>
);
}

Expand Down

0 comments on commit 49e9003

Please sign in to comment.