diff options
author | 2019-09-05 09:49:25 +0200 | |
---|---|---|
committer | 2019-09-05 09:49:25 +0200 | |
commit | 24d0223fee38c36ec19d9c662579dba7d787f8b4 (patch) | |
tree | 17a50e725cef1266506fc9ac6352c15a120cba78 /src/features/workspaces/containers/WorkspacesScreen.js | |
parent | don't warn on react/destructuring-assignment (diff) | |
download | ferdium-app-24d0223fee38c36ec19d9c662579dba7d787f8b4.tar.gz ferdium-app-24d0223fee38c36ec19d9c662579dba7d787f8b4.tar.zst ferdium-app-24d0223fee38c36ec19d9c662579dba7d787f8b4.zip |
polishing
Diffstat (limited to 'src/features/workspaces/containers/WorkspacesScreen.js')
-rw-r--r-- | src/features/workspaces/containers/WorkspacesScreen.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/features/workspaces/containers/WorkspacesScreen.js b/src/features/workspaces/containers/WorkspacesScreen.js index 2ab565fa1..5fbb0c31d 100644 --- a/src/features/workspaces/containers/WorkspacesScreen.js +++ b/src/features/workspaces/containers/WorkspacesScreen.js | |||
@@ -10,29 +10,38 @@ import { | |||
10 | getUserWorkspacesRequest, | 10 | getUserWorkspacesRequest, |
11 | updateWorkspaceRequest, | 11 | updateWorkspaceRequest, |
12 | } from '../api'; | 12 | } from '../api'; |
13 | import UserStore from '../../../stores/UserStore'; | ||
13 | 14 | ||
14 | @inject('actions') @observer | 15 | @inject('stores', 'actions') @observer |
15 | class WorkspacesScreen extends Component { | 16 | class WorkspacesScreen extends Component { |
16 | static propTypes = { | 17 | static propTypes = { |
18 | stores: PropTypes.shape({ | ||
19 | user: PropTypes.instanceOf(UserStore), | ||
20 | }).isRequired, | ||
17 | actions: PropTypes.shape({ | 21 | actions: PropTypes.shape({ |
18 | workspace: PropTypes.shape({ | 22 | workspace: PropTypes.shape({ |
19 | edit: PropTypes.func.isRequired, | 23 | edit: PropTypes.func.isRequired, |
20 | }), | 24 | }), |
25 | ui: PropTypes.shape({ | ||
26 | openSettings: PropTypes.func.isRequired, | ||
27 | }), | ||
21 | }).isRequired, | 28 | }).isRequired, |
22 | }; | 29 | }; |
23 | 30 | ||
24 | render() { | 31 | render() { |
25 | const { actions } = this.props; | 32 | const { stores, actions } = this.props; |
26 | return ( | 33 | return ( |
27 | <ErrorBoundary> | 34 | <ErrorBoundary> |
28 | <WorkspacesDashboard | 35 | <WorkspacesDashboard |
29 | workspaces={workspaceStore.workspaces} | 36 | workspaces={workspaceStore.workspaces} |
37 | isPersonalUser={stores.user.isPersonal} | ||
30 | getUserWorkspacesRequest={getUserWorkspacesRequest} | 38 | getUserWorkspacesRequest={getUserWorkspacesRequest} |
31 | createWorkspaceRequest={createWorkspaceRequest} | 39 | createWorkspaceRequest={createWorkspaceRequest} |
32 | deleteWorkspaceRequest={deleteWorkspaceRequest} | 40 | deleteWorkspaceRequest={deleteWorkspaceRequest} |
33 | updateWorkspaceRequest={updateWorkspaceRequest} | 41 | updateWorkspaceRequest={updateWorkspaceRequest} |
34 | onCreateWorkspaceSubmit={data => actions.workspaces.create(data)} | 42 | onCreateWorkspaceSubmit={data => actions.workspaces.create(data)} |
35 | onWorkspaceClick={w => actions.workspaces.edit({ workspace: w })} | 43 | onWorkspaceClick={w => actions.workspaces.edit({ workspace: w })} |
44 | onUpgradeAccount={() => actions.ui.openSettings({ path: 'user' })} | ||
36 | /> | 45 | /> |
37 | </ErrorBoundary> | 46 | </ErrorBoundary> |
38 | ); | 47 | ); |