mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-29 08:07:48 +01:00
display todos reversed
This commit is contained in:
@@ -133,9 +133,9 @@ export function fetchLists() {
|
||||
newObj[list.id] = {
|
||||
dirty: true,
|
||||
fetching: false,
|
||||
todos: null,
|
||||
editing: false,
|
||||
...list,
|
||||
todos: [...list.todos.reverse()],
|
||||
};
|
||||
return newObj;
|
||||
}, {});
|
||||
|
||||
@@ -71,7 +71,7 @@ class Todo extends React.Component {
|
||||
) : (
|
||||
<button
|
||||
className={todoClasses.join(' ')}
|
||||
onClick={this.state.hover && this.props.toggleTodo}
|
||||
onClick={this.state.hover ? this.props.toggleTodo : null}
|
||||
>
|
||||
{this.props.todo.text}
|
||||
</button>
|
||||
|
||||
@@ -32,6 +32,9 @@ function mapDispatchToProps(dispatch) {
|
||||
};
|
||||
}
|
||||
|
||||
const TodosContainer = connect(mapStateToProps, mapDispatchToProps)(TodoList);
|
||||
const TodosContainer = connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(TodoList);
|
||||
|
||||
export default TodosContainer;
|
||||
|
||||
Reference in New Issue
Block a user