diff options
Diffstat (limited to 'src/features/todos/containers/TodosScreen.js')
-rw-r--r-- | src/features/todos/containers/TodosScreen.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/features/todos/containers/TodosScreen.js b/src/features/todos/containers/TodosScreen.js new file mode 100644 index 000000000..d071d0677 --- /dev/null +++ b/src/features/todos/containers/TodosScreen.js | |||
@@ -0,0 +1,32 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | |||
4 | import TodosWebview from '../components/TodosWebview'; | ||
5 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; | ||
6 | import { TODOS_MIN_WIDTH, todosStore } from '..'; | ||
7 | import { todoActions } from '../actions'; | ||
8 | |||
9 | @observer | ||
10 | class TodosScreen extends Component { | ||
11 | render() { | ||
12 | if (!todosStore || !todosStore.isFeatureActive) { | ||
13 | return null; | ||
14 | } | ||
15 | |||
16 | return ( | ||
17 | <ErrorBoundary> | ||
18 | <TodosWebview | ||
19 | isVisible={todosStore.isTodosPanelVisible} | ||
20 | togglePanel={todoActions.toggleTodosPanel} | ||
21 | handleClientMessage={todoActions.handleClientMessage} | ||
22 | setTodosWebview={webview => todoActions.setTodosWebview({ webview })} | ||
23 | width={todosStore.width} | ||
24 | minWidth={TODOS_MIN_WIDTH} | ||
25 | resize={width => todoActions.resize({ width })} | ||
26 | /> | ||
27 | </ErrorBoundary> | ||
28 | ); | ||
29 | } | ||
30 | } | ||
31 | |||
32 | export default TodosScreen; | ||