Skip to content

Commit

Permalink
test code
Browse files Browse the repository at this point in the history
Signed-off-by: Efren Lim <[email protected]>
  • Loading branch information
emlimlf committed Oct 1, 2024
1 parent 8a00a5c commit b2f3d81
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions js/TodoFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ function pluralize(count, word) {
return count === 1 ? word : word + 's';
}

export default function TodoFooter({
activeCount,
completedCount,
showTodos,
onClearCompleted,
onShowTodos
}) {
export default function TodoFooter({ activeCount, completedCount, showTodos, onClearCompleted, onShowTodos }) {
return (
<footer className="footer">
<span className="todo-count">
Expand All @@ -20,22 +14,22 @@ export default function TodoFooter({
</span>

<ul className="filters">
{['all', 'active', 'completed'].map(filter => (
{['all', 'active', 'completed'].map((filter) => (
<li key={filter}>
<a
style={{ cursor: 'pointer' }}
onClick={() => (onShowTodos(filter), false)}
className={classNames({ selected: showTodos === filter })}>
{filter[0].toUpperCase()}{filter.substring(1)}
className={classNames({ selected: showTodos === filter })}
>
{filter[0].toUpperCase()}
{filter.substring(1)}
</a>
</li>
))}
</ul>

{completedCount > 0 ? (
<button
className="clear-completed"
onClick={onClearCompleted}>
<button style="background-color: red" className="clear-completed" onClick={onClearCompleted}>
Clear completed
</button>
) : null}
Expand Down

0 comments on commit b2f3d81

Please sign in to comment.