mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 15:47:48 +01:00
24 lines
509 B
JavaScript
24 lines
509 B
JavaScript
import { connect } from 'react-redux';
|
|
import UserHeader from '../components/UserHeader';
|
|
import { fetchLists } from '../actions/lists';
|
|
|
|
function mapStateToProps(state) {
|
|
return {
|
|
user: state.user,
|
|
dirtyLists: state.lists.dirty,
|
|
dirtyTodos: state.todos.dirty,
|
|
fetchingLists: state.lists.fetching,
|
|
};
|
|
}
|
|
|
|
function mapDispatchToProps(dispatch) {
|
|
return {
|
|
fetchLists: () => dispatch(fetchLists()),
|
|
};
|
|
}
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps,
|
|
)(UserHeader);
|