Skip to content

Commit

Permalink
Fixes typo
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubray committed Jul 16, 2019
1 parent 9c48b59 commit e5bd870
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions todomvc-app-react/src/sam/TodoApp.js
Expand Up @@ -13,6 +13,7 @@ export function TodoAppFactory(intents, initialState) {

TodoApp = function () {
[todos, setTodos] = useState(initialState)

function handleKeyDown(e, id) {
if (e.key === 'Enter') {
save({ id, name: e.target.value });
Expand All @@ -24,7 +25,7 @@ export function TodoAppFactory(intents, initialState) {
e.preventDefault();
return del({ deleteId: id });
}
}
}

const Filters = ({ todos }) => {
const displaySelectedClass = (todos.displayActive && todos.displayCompleted) ? 'selected' : ''
Expand Down Expand Up @@ -52,19 +53,19 @@ export function TodoAppFactory(intents, initialState) {
)
}
const ClearCompleted = ({ completedCount }) => {
if (completedCount > 0) {
return (
<button className="clear-completed"
onClick={(e) => {
e.preventDefault()
del({})
}}
>Clear completed</button>
)
}
return (
<div></div>
)
if (completedCount > 0) {
return (
<button className="clear-completed"
onClick={(e) => {
e.preventDefault()
del({})
}}
>Clear completed</button>
)
}
return (
<div></div>
)
}

const TodoList = ({ items, displayActive, displayCompleted }) => {
Expand Down

0 comments on commit e5bd870

Please sign in to comment.