aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/todos/containers/TodosScreen.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/features/todos/containers/TodosScreen.js')
-rw-r--r--src/features/todos/containers/TodosScreen.js23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/features/todos/containers/TodosScreen.js b/src/features/todos/containers/TodosScreen.js
index 5b7c4531b..2b81bd728 100644
--- a/src/features/todos/containers/TodosScreen.js
+++ b/src/features/todos/containers/TodosScreen.js
@@ -5,26 +5,19 @@ import PropTypes from 'prop-types';
5import TodosWebview from '../components/TodosWebview'; 5import TodosWebview from '../components/TodosWebview';
6import ErrorBoundary from '../../../components/util/ErrorBoundary'; 6import ErrorBoundary from '../../../components/util/ErrorBoundary';
7import UserStore from '../../../stores/UserStore'; 7import UserStore from '../../../stores/UserStore';
8import TodoStore from '../store'; 8import { TODOS_MIN_WIDTH, todosStore } from '..';
9import { TODOS_MIN_WIDTH } from '..'; 9import { todoActions } from '../actions';
10 10
11@inject('stores', 'actions') @observer 11@inject('stores') @observer
12class TodosScreen extends Component { 12class TodosScreen extends Component {
13 static propTypes = { 13 static propTypes = {
14 stores: PropTypes.shape({ 14 stores: PropTypes.shape({
15 user: PropTypes.instanceOf(UserStore).isRequired, 15 user: PropTypes.instanceOf(UserStore).isRequired,
16 todos: PropTypes.instanceOf(TodoStore).isRequired,
17 }).isRequired,
18 actions: PropTypes.shape({
19 todos: PropTypes.shape({
20 resize: PropTypes.func.isRequired,
21 handleIPCMessage: PropTypes.func.isRequired,
22 }),
23 }).isRequired, 16 }).isRequired,
24 }; 17 };
25 18
26 render() { 19 render() {
27 const { stores, actions } = this.props; 20 const { stores } = this.props;
28 21
29 if (!stores.todos || !stores.todos.isFeatureActive) { 22 if (!stores.todos || !stores.todos.isFeatureActive) {
30 return null; 23 return null;
@@ -34,11 +27,11 @@ class TodosScreen extends Component {
34 <ErrorBoundary> 27 <ErrorBoundary>
35 <TodosWebview 28 <TodosWebview
36 authToken={stores.user.authToken} 29 authToken={stores.user.authToken}
37 handleClientMessage={actions.todos.handleClientMessage} 30 handleClientMessage={todoActions.handleClientMessage}
38 setTodosWebview={webview => actions.todos.setTodosWebview({ webview })} 31 setTodosWebview={webview => todoActions.setTodosWebview({ webview })}
39 width={stores.todos.width} 32 width={todosStore.width}
40 minWidth={TODOS_MIN_WIDTH} 33 minWidth={TODOS_MIN_WIDTH}
41 resize={width => actions.todos.resize({ width })} 34 resize={width => todoActions.resize({ width })}
42 /> 35 />
43 </ErrorBoundary> 36 </ErrorBoundary>
44 ); 37 );