function Footer()

in Output/Llama31_405B/JS/contextual_experiment/translate_to_react/1722507673/components/Footer.tsx [5:15]


function Footer() {
  const todos = useSelector((state) => state.todos);
  const dispatch = useDispatch();
  const remainingCount = todos.filter((todo) => !todo.completed).length;

  return (
    <footer className="footer">
      <span className="todo-count">
        <strong>{remainingCount}</strong> item{remainingCount === 1 ? '' : 's'} left
      </span>
      <button className="clear-completed" onClick={() => dispatch(clearCompleted())}>