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.js19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/features/todos/containers/TodosScreen.js b/src/features/todos/containers/TodosScreen.js
index d071d0677..7f3688828 100644
--- a/src/features/todos/containers/TodosScreen.js
+++ b/src/features/todos/containers/TodosScreen.js
@@ -1,12 +1,14 @@
1import React, { Component } from 'react'; 1import React, { Component } from 'react';
2import { observer } from 'mobx-react'; 2import { observer, inject } from 'mobx-react';
3import PropTypes from 'prop-types';
3 4
5import FeaturesStore from '../../../stores/FeaturesStore';
4import TodosWebview from '../components/TodosWebview'; 6import TodosWebview from '../components/TodosWebview';
5import ErrorBoundary from '../../../components/util/ErrorBoundary'; 7import ErrorBoundary from '../../../components/util/ErrorBoundary';
6import { TODOS_MIN_WIDTH, todosStore } from '..'; 8import { TODOS_MIN_WIDTH, todosStore } from '..';
7import { todoActions } from '../actions'; 9import { todoActions } from '../actions';
8 10
9@observer 11@inject('stores', 'actions') @observer
10class TodosScreen extends Component { 12class TodosScreen extends Component {
11 render() { 13 render() {
12 if (!todosStore || !todosStore.isFeatureActive) { 14 if (!todosStore || !todosStore.isFeatureActive) {
@@ -23,6 +25,8 @@ class TodosScreen extends Component {
23 width={todosStore.width} 25 width={todosStore.width}
24 minWidth={TODOS_MIN_WIDTH} 26 minWidth={TODOS_MIN_WIDTH}
25 resize={width => todoActions.resize({ width })} 27 resize={width => todoActions.resize({ width })}
28 isTodosIncludedInCurrentPlan={this.props.stores.features.features.isTodosIncludedInCurrentPlan || false}
29 upgradeAccount={() => this.props.actions.ui.openSettings({ path: 'user' })}
26 /> 30 />
27 </ErrorBoundary> 31 </ErrorBoundary>
28 ); 32 );
@@ -30,3 +34,14 @@ class TodosScreen extends Component {
30} 34}
31 35
32export default TodosScreen; 36export default TodosScreen;
37
38TodosScreen.wrappedComponent.propTypes = {
39 stores: PropTypes.shape({
40 features: PropTypes.instanceOf(FeaturesStore).isRequired,
41 }).isRequired,
42 actions: PropTypes.shape({
43 ui: PropTypes.shape({
44 openSettings: PropTypes.func.isRequired,
45 }).isRequired,
46 }).isRequired,
47};