diff --git a/src/pages/TaskListPage/TodoListContainer/index.jsx b/src/pages/TaskListPage/TodoListContainer/index.jsx index dc77789..f2d0503 100644 --- a/src/pages/TaskListPage/TodoListContainer/index.jsx +++ b/src/pages/TaskListPage/TodoListContainer/index.jsx @@ -6,11 +6,12 @@ import { setLoader } from "../../../actions/ui"; class TodoListContainer extends Component { constructor(props) { super(props); - this.state = { - list: [], - filterApplied: false, - hideTimer: false - }; + // this.state = { + // list: [], + // filterApplied: false, + // hideTimer: false + // }; + this.state = props.state; this.toggleTimer = this.toggleTimer.bind(this); this.toggleListItem = this.toggleListItem.bind(this); this.performAddTask = this.performAddTask.bind(this); @@ -64,7 +65,7 @@ class TodoListContainer extends Component { render() { const { filterApplied } = this.state; - const { list, loading } = this.props; + const { list, loading } = this.props.state; return ( { return { loading: state.ui.loading, - list: state.tasks.data + // list: state.tasks.data + state: state.tasks.data } } diff --git a/src/reducers/initialState.js b/src/reducers/initialState.js index 5e7c237..20f5797 100644 --- a/src/reducers/initialState.js +++ b/src/reducers/initialState.js @@ -4,7 +4,12 @@ const initialState = { notifcations: [] }, tasks:{ - data: [] + // data: [], + data: { + list: [], + filterApplied: false, + hideTimer: false + } }, dashboard: { data: []