diff options
Diffstat (limited to 'src/containers/settings/WorkspacesScreen.js')
-rw-r--r-- | src/containers/settings/WorkspacesScreen.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/containers/settings/WorkspacesScreen.js b/src/containers/settings/WorkspacesScreen.js index e767fdfbe..5e91f7673 100644 --- a/src/containers/settings/WorkspacesScreen.js +++ b/src/containers/settings/WorkspacesScreen.js | |||
@@ -1,25 +1,33 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import { observer } from 'mobx-react'; | 2 | import { inject, observer } from 'mobx-react'; |
3 | import PropTypes from 'prop-types'; | ||
3 | import { gaPage } from '../../lib/analytics'; | 4 | import { gaPage } from '../../lib/analytics'; |
4 | import { state } from '../../features/workspaces/state'; | 5 | import { state } from '../../features/workspaces/state'; |
5 | |||
6 | import WorkspacesDashboard from '../../components/settings/workspaces/WorkspacesDashboard'; | 6 | import WorkspacesDashboard from '../../components/settings/workspaces/WorkspacesDashboard'; |
7 | import ErrorBoundary from '../../components/util/ErrorBoundary'; | 7 | import ErrorBoundary from '../../components/util/ErrorBoundary'; |
8 | 8 | ||
9 | @observer | 9 | @inject('actions') @observer |
10 | class WorkspacesScreen extends Component { | 10 | class WorkspacesScreen extends Component { |
11 | static propTypes = {}; | 11 | static propTypes = { |
12 | actions: PropTypes.shape({ | ||
13 | workspace: PropTypes.shape({ | ||
14 | edit: PropTypes.func.isRequired, | ||
15 | }), | ||
16 | }).isRequired, | ||
17 | }; | ||
12 | 18 | ||
13 | componentDidMount() { | 19 | componentDidMount() { |
14 | gaPage('Settings/Workspaces Dashboard'); | 20 | gaPage('Settings/Workspaces Dashboard'); |
15 | } | 21 | } |
16 | 22 | ||
17 | render() { | 23 | render() { |
24 | const { workspace } = this.props.actions; | ||
18 | return ( | 25 | return ( |
19 | <ErrorBoundary> | 26 | <ErrorBoundary> |
20 | <WorkspacesDashboard | 27 | <WorkspacesDashboard |
21 | workspaces={state.workspaces} | 28 | workspaces={state.workspaces} |
22 | isLoading={state.isLoading} | 29 | isLoading={state.isLoading} |
30 | onWorkspaceClick={w => workspace.edit({ workspace: w })} | ||
23 | /> | 31 | /> |
24 | </ErrorBoundary> | 32 | </ErrorBoundary> |
25 | ); | 33 | ); |